This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients alanr, eric.smith, remi.lapeyre
Date 2020-03-03.21:27:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583270869.24.0.464182657914.issue39841@roundup.psfhosted.org>
In-reply-to
Content
Yes, this is a known issue.

See https://docs.python.org/3/reference/compound_stmts.html#the-try-statement, in particular the sentence "When an exception has been assigned using as target, it is cleared at the end of the except clause" and the following text.

Basically, at the end of the exception block python does a "del err" in order to prevent a long-lived reference cycle including the exception.
History
Date User Action Args
2020-03-03 21:27:49eric.smithsetrecipients: + eric.smith, remi.lapeyre, alanr
2020-03-03 21:27:49eric.smithsetmessageid: <1583270869.24.0.464182657914.issue39841@roundup.psfhosted.org>
2020-03-03 21:27:49eric.smithlinkissue39841 messages
2020-03-03 21:27:49eric.smithcreate