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
I need to re-raise some exception in the exception processing, but when I copy & paste the copy from my editor for following test code, I encounter the syntax error.
The code:
try:
a = 5
except:
raise
else:
print a
The ipython error:
In [565]: try:
.....: a = 5
.....: except:
.....: raise
.....: else:
------------------------------------------------------------
File "", line 5
lse:
^
SyntaxError: invalid syntax
If I manually input the above code, there is no problem:
In [568]: try:
.....: a = 5
.....: except:
.....: raise
.....: else:
.....: print a
.....:
.....:
5
But even with manual input, if I add 4 additional space at each indention (actually only the one before 'raise' matters), I got the same error
The text was updated successfully, but these errors were encountered:
There is however a problem with trying to input something like the above code, which fails in 0.11. I'll open a separate issue for that. Closing this one though, since it's now fixed.
Original Launchpad bug 525112: https://bugs.launchpad.net/ipython/+bug/525112
Reported by: talich (Jianping Hua).
Python 2.6.2, ipython 0.10, Mac OSX leopard.
I need to re-raise some exception in the exception processing, but when I copy & paste the copy from my editor for following test code, I encounter the syntax error.
The code:
If I manually input the above code, there is no problem:
But even with manual input, if I add 4 additional space at each indention (actually only the one before 'raise' matters), I got the same error
The text was updated successfully, but these errors were encountered: