Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

quit() doesn't work in terminal #1117

Closed
bfroehle opened this Issue · 6 comments

2 participants

@bfroehle
[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)
@bfroehle

git bisect places the regression in commit 17afbbe.

@takluyver takluyver was assigned
@takluyver
Owner

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

@bfroehle

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)

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

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

See PR #1121.

@bfroehle bfroehle referenced this issue from a commit in bfroehle/ipython
@bfroehle bfroehle Do not add extra brackets for autocallable functions.
Closes gh-1117.
8303bd1
@takluyver
Owner

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

@takluyver takluyver closed this
@ellisonbg ellisonbg referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
@takluyver 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.