New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return kills IPython #704

Closed
asmeurer opened this Issue Aug 16, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@asmeurer
Contributor

asmeurer commented Aug 16, 2011

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.

@asmeurer

This comment has been minimized.

Contributor

asmeurer commented Aug 16, 2011

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...

@fperez

This comment has been minimized.

Member

fperez commented Aug 16, 2011

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

@fperez fperez closed this in 1a64b37 Aug 16, 2011

@asmeurer

This comment has been minimized.

Contributor

asmeurer commented Aug 16, 2011

Nice. I can confirm that this works now.

Thanks for the super quick fix!

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

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 ipythongh-704.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment