GH+Python Practice #03 | Data Holder (Class)
Contents
- Class
- Data Holder
Class
class classname: def __init__(self): self.variable = value def function(self,argument): pass #any code here
Data Holder
DataHolder component:
class dataholder: def __init__(self): self.x = x self.y = y self.z = z def reset(self): self.x = x self.y = y self.z = z a = dataholder()
Updater component:
if x!=null: dataholder.x = x if y!=null: dataholder.y = y if z!=null: dataholder.z = z if reset: dataholder.reset() a = dataholder.x b = dataholder.y c = dataholder.z