In article <87fwvw214g....@gmail.com>, Arnaud Delobelle <arno...@gmail.com> wrote: > >Are you referring to the fact that in Python, if an attribute is a >property, the __dict__ lookup on the instance is not performed? As in: > >>>> class A: >... @property >... def x(self): return 42 >... >>>> a = A() >>>> a.__dict__['x'] = 24 >>>> a.x >42 >>>> a.__dict__['x'] >24 > >This is documented, but I actually don't know the reason for it.
Because otherwise you would be able to overwrite the property with a value. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Look, it's your affair if you want to play with five people, but don't go calling it doubles." --John Cleese anticipates Usenet -- http://mail.python.org/mailman/listinfo/python-list