akonsu wrote:
i am not an expert in python, would someone please tell me what i am
doing wrong?

You can't add properties to an instance. They must be specified on the type (aka new style class). Descriptors and magic methods are only looked up on classes for various reasons - mostly performance reasons. Old style classes behave differently but properties don't work with old style classes.

You can archive the same behavior by hooking into __getattr__, __setattr__ and __delattr__. Mind the speed penelty, though!

Christian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to