This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Paul.Davis, docs@python, terry.reedy
Date 2010-08-07.19:45:18
SpamBayes Score 1.12922e-10
Marked as misclassified No
Message-id <1281210320.11.0.132894784105.issue8722@psf.upfronthosting.co.za>
In-reply-to
Content
The problem with changing 2.7 docs is that object access is different for old- and new-style properties. Does your example work if you remove 'object'? (IE, can old style classes have properties?)

For new-style classes, the example behavior is clear if you 1. know that object has a .__getattribute__ method inherited by everything when not overriden and 2. read the doc for that which says that __getattr__ is called whenever a __getattribute__ call raises AttributeError, which it does here by passing through the .get error.

For 3.x, I think in 3.3.2. Customizing attribute access,
object.__getattr__(self, name) 
"Called when an attribute lookup has not found the attribute in the usual places (i.e. it is not an instance attribute nor is it found in the class tree for self). name is the attribute name. "

might be replaced by

"Called when self.__getattribute__(name) raise AttributeError because name is not an instance attribute, not found in the class tree for self, or is a property attribute whose .get() method raises AttributeError."

But this does not work for 2.7.
History
Date User Action Args
2010-08-07 19:45:20terry.reedysetrecipients: + terry.reedy, docs@python, Paul.Davis
2010-08-07 19:45:20terry.reedysetmessageid: <1281210320.11.0.132894784105.issue8722@psf.upfronthosting.co.za>
2010-08-07 19:45:18terry.reedylinkissue8722 messages
2010-08-07 19:45:18terry.reedycreate