Message363303
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. |
|
Date |
User |
Action |
Args |
2020-03-03 21:27:49 | eric.smith | set | recipients:
+ eric.smith, remi.lapeyre, alanr |
2020-03-03 21:27:49 | eric.smith | set | messageid: <1583270869.24.0.464182657914.issue39841@roundup.psfhosted.org> |
2020-03-03 21:27:49 | eric.smith | link | issue39841 messages |
2020-03-03 21:27:49 | eric.smith | create | |
|