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
! after line continuation causes SyntaxError #8987
Hi! I was playing with IPython and something stop working as expected... It took me a bit of testing to found out why and I'm wondering if this is an expected behaviour or not?
Here the src that cause the problem: https://gist.github.com/kapare/6969b2a58b7855a0b2f3
[1] The line that make SyntaxError: is 98 but it display line 92.
[2] Splitting the string at 94 cause the SyntaxError? Is it expected?
changed the title [-]IPython raise SyntaxError: invalid syntax after a string is split in argparse.add_argument[/-][+]! after line continuation causes SyntaxError[/+]on Nov 13, 2015
The smaller example does not reproduce it for me in master, even when saved to a .ipy file. I think it has to be an explicit line continuation within a multiline Python expression, and not on the first line. This reproduces it:
Activity
[-]IPython raise SyntaxError: invalid syntax after a string is split in argparse.add_argument[/-][+]! after line continuation causes SyntaxError[/+]minrk commentedon Nov 13, 2015
From gitter, a smaller example that reproduces the issue:
takluyver commentedon Jan 26, 2016
The smaller example does not reproduce it for me in master, even when saved to a
.ipyfile. I think it has to be an explicit line continuation within a multiline Python expression, and not on the first line. This reproduces it:MrMino commentedon Mar 27, 2022
Neither of the two examples produce
SyntaxErroranymore.