Advertisement
Guest User

Mockup

a guest
Feb 9th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. class Activity:
  2.     def __init__(self, _id, name):
  3.         self.id = _id
  4.         self.name = name
  5.         self.list_of_activities = []
  6.        
  7.     def get_activities(self):
  8.         self.list_of_activities = [] #reset the list anytime the method is called
  9.        
  10.         '''the method then gets the input from the gui (pyside)
  11.        creates different Activity objects and appends them to the list'''
  12.        
  13.         #i feel it's better to return the list instead of storing it internally'
  14.        
  15.     def other_method(self):
  16.         pass # should list_activities passed to it but i just use self.list_of_activities instead there are several methods like this
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement