[issue38530] Offer suggestions on AttributeError

Pablo Galindo Salgado report at bugs.python.org
Sat Oct 19 17:24:13 EDT 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> But the problem is that making a reference to the object we can prolong its lifetime and even create a reference loop.

If I'm not mistaken, as long as the traceback is alive, the object is alive beacuse the frames will contain it. The other case is if the exception is not propagated, but in that case it should just die unless explicitly captured. There is a link you can find to previous discussions?

The cycle only happens if the object has a reference to the exception, and that should not happen in the general case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38530>
_______________________________________


More information about the Python-bugs-list mailing list