setattr getattr confusion

Donn Ingle donn.ingle at gmail.com
Sat Dec 8 11:42:28 EST 2007


> class Key(object):
> def __init__self):
> self.__dict__['props'] = KeyProps()
Okay - that's weird. Is there another way to spin this?

> def __setattr__(self,var,val):
> setattr(self.props,var,val)
Perhaps by changing this one?

\d




More information about the Python-list mailing list