Message5422

Author pjenvey
Recipients iamedu, pjenvey
Date 2010-01-10.22:30:44
SpamBayes Score 5.95949e-07
Marked as misclassified No
Message-id <1263162645.9.0.439308555661.issue1534@psf.upfronthosting.co.za>
In-reply-to
Content
Jython/Pypy seem more correct than CPython according to the rules on http://docs.python.org/reference/datamodel.html

"For instance bindings, the precedence of descriptor invocation depends on the which descriptor methods are defined. Normally, data descriptors define both __get__() and __set__(), while non-data descriptors have just the __get__() method. Data descriptors always override a redefinition in an instance dictionary. In contrast, non-data descriptors can be overridden by instances."

"A descriptor can define any combination of __get__(), __set__() and __delete__(). If it does not define __get__(), then accessing the attribute even on an instance will return the descriptor object itself. If the descriptor defines __set__() and/or __delete__(), it is a data descriptor; if it defines neither, it is a non-data descriptor."

But I don't think we can fault CPython as it's had this behavior forever
History
Date User Action Args
2010-01-10 22:30:45pjenveysetmessageid: <1263162645.9.0.439308555661.issue1534@psf.upfronthosting.co.za>
2010-01-10 22:30:45pjenveysetrecipients: + pjenvey, iamedu
2010-01-10 22:30:45pjenveylinkissue1534 messages
2010-01-10 22:30:45pjenveycreate