On Sun, Sep 30, 2001 at 02:37:00PM -0400, Guido van Rossum wrote:
Sure. Still, I think interpreter diagnostics should be pointing to the exact place of trouble. At least, __getattribute__ must appear somewhere in the traceback to give a hint where from __repr__ was attempted to be called.
When you write a faulty __getattribute__ that returns None instead of raising AttributeError, it's not realistic to expect __getattribute__ to be in the stack trace.
PyChecker might want to give an error if flow in __getattr[ibute]__ doesn't either pass through a return or a 'raise AttributeError'. Even if the intent is to have attributes default to None, an explicit 'return None' could be added.