Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

quit() doesn't work in terminal #1117

Closed
bfroehle opened this Issue · 6 comments

2 participants

Bradley M. Froehle Thomas Kluyver
Bradley M. Froehle
Collaborator
[bfroehle@highorder]$ ipython
Python 2.7.2+ (default, Oct  4 2011, 20:06:09) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12.beta -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: quit()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/bfroehle/<ipython-input-1-369dbed58733> in <module>()
----> 1 quit(())

TypeError: __call__() takes exactly 1 argument (2 given)
Bradley M. Froehle
Collaborator

git bisect places the regression in commit 17afbbe.

Thomas Kluyver takluyver was assigned
Thomas Kluyver
Owner

This looks like an issue with how we handle doing autocalls. I'll look into it.

Bradley M. Froehle
Collaborator

Another oddity... why does /quit turn into quit(()) but /f only turns into f()?

In [1]: /quit
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/bfroehle/<ipython-input-1-369dbed58733> in <module>()
----> 1 quit(())

TypeError: __call__() takes exactly 1 argument (2 given)

Thomas Kluyver
Owner

Again, I guess it's to do with the fact that quit is an IPyAutocall object, which forces it to become a function call separately from the normal autocall mechanisms.

Thomas Kluyver takluyver referenced this issue from a commit in takluyver/ipython
Thomas Kluyver takluyver Add test for gh-1117 c87e2e8
Thomas Kluyver
Owner

See PR #1121.

Bradley M. Froehle bfroehle referenced this issue from a commit in bfroehle/ipython
Bradley M. Froehle bfroehle Do not add extra brackets for autocallable functions.
Closes gh-1117.
8303bd1
Thomas Kluyver
Owner

Closed by PR #1121, merged with commit 7ea3e2f.

Thomas Kluyver takluyver closed this
Brian E. Granger ellisonbg 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
Thomas Kluyver takluyver Add test for gh-1117 4bb047c
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.