New submission from Kevin Modzelewski <[email protected]>:

Doesn't seem very important but I thought I'd report it:



import sys

try:
    raise Exception()
except:
    pass
sys.exc_clear()

try:
    raise
except TypeError:
    # Should print this line:
    print "success"



The "raise" statement throws a TypeError as expected; in PyPy, though, this 
TypeError won't trigger the except-clause that follows it, and instead 
immediately propagates to the next frame up.  This only happens if there was a 
previously-thrown exception in this frame that then got cleared with 
sys.exc_clear().

----------
messages: 6849
nosy: kmod, pypy-issue
priority: bug
status: unread
title: sys.exc_clear() then re-"raise" raises at the wrong scope

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1755>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to