Skip to content
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

Fix the display of functions with keyword-only arguments on Python 3. #5125

Merged
merged 1 commit into from Feb 14, 2014

Conversation

takluyver
Copy link
Member

On Python 3, we need to use getfullargspec to get the necessary information. The extra 3 fields (kwonlyargs, kwonlydefaults, annotations) are also added to the 'argspec' field of an info dictionary, but those Python-specific fields are being dropped from the message spec soon anyway.

Before:

In [3]: def f(a, b=None, *, c):
   ...:     pass
   ...: 

In [4]: f?
...
Definition: f(a, b, c=None)

After:

...
Definition: f(a, b=None, *, c)

@minrk
Copy link
Member

minrk commented Feb 14, 2014

Makes sense, test passes, merging.

minrk added a commit that referenced this pull request Feb 14, 2014
Fix the display of functions with keyword-only arguments on Python 3.
@minrk minrk merged commit 4a08574 into ipython:master Feb 14, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
…only

Fix the display of functions with keyword-only arguments on Python 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants