Skip to content
This repository

quit() doesn't work in terminal #1117

Closed
bfroehle opened this Issue December 07, 2011 · 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
Collaborator

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
Collaborator

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 December 07, 2011
Thomas Kluyver Add test for gh-1117 c87e2e8
Thomas Kluyver
Collaborator

See PR #1121.

Bradley M. Froehle bfroehle referenced this issue from a commit in bfroehle/ipython December 07, 2011
Bradley M. Froehle Do not add extra brackets for autocallable functions.
Closes gh-1117.
8303bd1
Thomas Kluyver takluyver closed this December 09, 2011
Thomas Kluyver
Collaborator

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

Brian E. Granger ellisonbg referenced this issue from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
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.