Hi, Our class has its attributes set as classes, as in
MyClass.Phone.Value='34562346' MyClass.Phone.Private=True Inside the MyClass definition we have a function like this: def MyFunc(self,clsProperty): if clsProperty.Private: print 'Private property' else: print ClsProperty.Value In our code, we then call >>> MyClass.MyFunc(MyClass.Phone) We want to be able in our code instead simply to call: >>> MyClass.MyFunc(Phone) or MyClass.MyFunc('Phone') But we can't get it to work. If we rewrite the function as follows: def MyFunc(self,attr): if self.attr.Private: print 'Private' else: print self.attr.Value we get an error. Is there a better way to do this? Thanks -- http://mail.python.org/mailman/listinfo/python-list