New submission from Paul Davis <paul.joseph.da...@gmail.com>:

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.

----------
assignee: d...@python
components: Documentation
files: example.py
messages: 105790
nosy: Paul.Davis, d...@python
priority: normal
severity: normal
status: open
title: Documentation for __getattr__
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file17349/example.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8722>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to