A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-March/098776.html below:

[Python-Dev] Attribute lookup ambiguity

[Python-Dev] Attribute lookup ambiguity [Python-Dev] Attribute lookup ambiguityGreg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 23 23:47:00 CET 2010
Pascal Chambon wrote:

> All I've found is "If the class also defines __getattr__(), 
> the latter will not be called unless __getattribute__()
> either calls it explicitly or raises an AttributeError

Hmmm. Well, it still implies that there is some mechanism
outside of __getattribute__ that will catch an AttributeError
and call __getattr__ for you. Given the existence of that
mechanism, it seems unlikely that the same thing would be
implemented over again in the standard __getattribute__
method.

So I don't think it requires very much guesswork to infer
that the standard __getattribute__ won't call __getattr__ on
its own.

I concede that the wording could be improved to remove any
possibility of doubt, though.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4