You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
2to3 raise can silently remove code from old 2.4 string exceptions #84727
When running "2to3 -f raise" on the following code, which uses an old Python 2.4 raise of a string:
deff():
raise ("message %s %s"% (1, 2))
try:
f()
finally:
pass
I obtain the following quite surprising result. I would have expected to get either an error or leave the original file unchanged, because "raise (s)" is syntactically valid although incorrect.
Activity
remyoudompheng commentedon May 7, 2020
When running "2to3 -f raise" on the following code, which uses an old Python 2.4 raise of a string:
try:
f()
finally:
pass
I obtain the following quite surprising result. I would have expected to get either an error or leave the original file unchanged, because "raise (s)" is syntactically valid although incorrect.