[Python-Dev] Attribute lookup ambiguity
greg.ewing at canterbury.ac.nz
Tue Mar 23 01:30:15 CET 2010
Pascal Chambon wrote:
> I don't follow you there - in my mind, the default __getattribute__
> could simply have wrapped all its operations inside soem kind of
> "try..catch AttributeError:" mechanism, and thus been able to fallback
> to __getattr__ in any way.
But then it would be incorrect to say that "__getattribute__
raises an exception".
When we say that a function raises an exception, we normally
mean that the exception propagates out of the function and
can be seen by the caller, not that it was raised and caught
somewhere inside the function.
More information about the Python-Dev