Message404764
I don't think this is a bug: there's still a reference to the `A` instance in `sys.exc_info()` (specifically, in the exception traceback) in this case, so that instance is still alive.
If you add an `except: pass` clause to your `try / finally`, you should see that dereferencing the weakref gives `None` in the `finally` clause. |
|
Date |
User |
Action |
Args |
2021-10-22 12:51:13 | mark.dickinson | set | recipients:
+ mark.dickinson, nascheme, pablogsal, nanjekyejoannah, guijarro |
2021-10-22 12:51:13 | mark.dickinson | set | messageid: <1634907073.52.0.552255984143.issue45555@roundup.psfhosted.org> |
2021-10-22 12:51:13 | mark.dickinson | link | issue45555 messages |
2021-10-22 12:51:13 | mark.dickinson | create | |
|