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

Bind self correctly when mapping class methods from supertype #7474

merged 2 commits into from Sep 5, 2019


Copy link

commented Sep 5, 2019

Fixes #2511

@ilevkivskyi ilevkivskyi requested a review from msullivan Sep 5, 2019
Copy link

left a comment

One question but looks good

elif isinstance(sym.node, OverloadedFuncDef):
is_class_method = sym.node.is_class
is_class_method = False

This comment has been minimized.

Copy link

msullivan Sep 5, 2019


Should we check is_class for regular FuncDefs? (It can be implicit for certain functions, right?)

This comment has been minimized.

Copy link

ilevkivskyi Sep 5, 2019

Author Collaborator

Hm, you are right, it is better to be on the safe side.

Ivan Levkivskyi
@ilevkivskyi ilevkivskyi merged commit 9958295 into python:master Sep 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
@ilevkivskyi ilevkivskyi deleted the ilevkivskyi:sub-class-self branch Sep 5, 2019
ilevkivskyi added a commit that referenced this pull request Sep 10, 2019
Fix a regression caused by #7474

The original PR correctly added `is_classmethod=...` in `bind_self()` for supertype, but I didn't notice the same problem (flag not passed) was also present for _subtype_. The fix is trivial.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.