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
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
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
Garrett Berg added the comment:
I forgot to post this:
python --version