Pablo Galindo Salgado <[email protected]> added the comment:
This is expected behaviour and happens because we need to clean the exception
variable outside the `except` block to avoid reference cycles. If you need the
variable later, you need to do an assignment:
try:
1/0
except Exception as exc:
e = exc
finally:
return e
----------
nosy: +pablogsal
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40728>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com