Package PyML :: Package base :: Module pymlObject
[hide private]
[frames] | no frames]

Source Code for Module PyML.base.pymlObject

 1   
2 -class PyMLobject (object) :
3
4 - def __init__(self, arg, **args) :
5 """ 6 Takes care of keyword arguments that are defined in the attributes 7 class attribute 8 """ 9 if not hasattr(self, 'attributes') : return 10 if self.__class__ == arg.__class__ : 11 for attribute in self.attributes : 12 setattr(self, attribute, getattr(arg, attribute)) 13 else : 14 for attribute in self.attributes : 15 if attribute in args : 16 setattr(self, attribute, args[attribute]) 17 else : 18 setattr(self, attribute, self.attributes[attribute])
19