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

pass *args to __new__ #173

Merged
merged 1 commit into from
Feb 17, 2016
Merged

pass *args to __new__ #173

merged 1 commit into from
Feb 17, 2016

Conversation

rmorshea
Copy link
Contributor

Positional arguments are left out of the call to super(...).__new__ here.

  • I also change kw to kwargs in a couple places to keep things consistent.

# This is needed because object.__new__ only accepts
# the cls argument.
new_meth = super(HasDescriptors, cls).__new__
if new_meth is object.__new__:
inst = new_meth(cls)
else:
inst = new_meth(cls, **kw)
inst = new_meth(cls, *args, **kwargs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason *args got left out?

minrk added a commit that referenced this pull request Feb 17, 2016
@minrk minrk merged commit 1d31bd7 into ipython:master Feb 17, 2016
@minrk minrk added this to the 4.2 milestone Feb 17, 2016
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.

2 participants