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 Paul.Davis
Recipients Paul.Davis, docs@python
Date 2010-05-15.04:10:56
SpamBayes Score 5.33672e-05
Marked as misclassified No
Message-id <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za>
In-reply-to
Content
The docs for __getattr__ in the object model section could be more specific on the behavior when a @property raises an AttributeError and there is a custom __getattr__ defined. Specifically, it wasn't exactly clear that __getattr__ would be invoked after a @property was found and evaluated.

The attached script demonstrates the issue on OS X 10.6, Python 2.6.1

I'm thinking something along the lines of:

If the attribute search encounters an AttributeError (perhaps due to a @property raising the error) the search is considered a failure and __getattr__ is invoked.
History
Date User Action Args
2010-05-15 04:10:59Paul.Davissetrecipients: + Paul.Davis, docs@python
2010-05-15 04:10:58Paul.Davissetmessageid: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za>
2010-05-15 04:10:57Paul.Davislinkissue8722 messages
2010-05-15 04:10:56Paul.Daviscreate