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
bpo-30140: fix binop dispatch for subclasses #1325
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
@shoyer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @benjaminp and @nascheme to be potential reviewers. |
96105e9
to
f1e11ed
Compare
f1e11ed
to
b5de219
Compare
self.assertEqual(E() // 1, "C.__floordiv__") | ||
self.assertEqual(1 // E(), "C.__rfloordiv__") | ||
self.assertEqual(E() // C(), "C.__floordiv__") | ||
self.assertEqual(C() // E(), "C.__floordiv__") # This one would fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these being taken out? I don't see div or floordiv in the above, so it doesn't look like it is just being tested differently (unless the tests were really redundant or something).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests here seemed redudant with the tests I added for add above, since the logic is not operator specific. I removed these specific testa because they were verifying the old (changed) behavior, but I could also keep them in and change to the new behavior.
Let's not merge until the new BDFL has decided on https://bugs.python.org/issue30140#msg325553 |
Looks like there is little appetite to merge/make a decision on this, Good to close? |
Yeah, let's give up on this one. |
This doesn't work yet, but I'm not quite sure why.This is now working.https://bugs.python.org/issue30140