[issue32317] sys.exc_clear() clears exception in other stack frames

2020-11-22 Thread Irit Katriel
Irit Katriel added the comment: sys.exc_clear was removed in Python 3: https://docs.python.org/3/whatsnew/3.0.html#index-22 -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
Garrett Berg added the comment: I found a workaround, and probably the reason this has not been detected before: import sys def doclear2() try: 1/0 except ZeroDivisionError: sys.exc_clear() try: 1/0 except

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
New submission from Garrett Berg : # Summary In python (2 or 3) it should always be valid to have a bare *raise* statement in an exception block. try: do_something() except SomeException: do_cleanup() raise # always reraises SomeException

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
Garrett Berg added the comment: I forgot to post this: python --version