Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

return kills IPython #704

Closed
asmeurer opened this Issue · 3 comments

2 participants

Aaron Meurer Fernando Perez
Aaron Meurer

If you type just

return

in IPython, it dies with SyntaxError: 'return' outside function (<ipython-input-1-64672a10de46>, line 1). I can paste the whole traceback here if you want.

Aaron Meurer

Sorry, I pressed my Return key, and it let me enter the issue with a blank description. I will edit it to what I want...

Fernando Perez
Owner

Wow, nasty... Will fix now, thanks for the report!

Fernando Perez fperez closed this issue from a commit
Fernando Perez fperez Prevent crash from invalid code such as a bare 'return'.
More generally, catch any exceptions from code that may have parsed
into an AST tree but doesn't actually compile.

Closes gh-704.
1a64b37
Fernando Perez fperez closed this in 1a64b37
Aaron Meurer

Nice. I can confirm that this works now.

Thanks for the super quick fix!

Fernando Perez fperez referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
matthew von rocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
Fernando Perez fperez Prevent crash from invalid code such as a bare 'return'.
More generally, catch any exceptions from code that may have parsed
into an AST tree but doesn't actually compile.

Closes gh-704.
eb8d3ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.