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
Got rid of bad dunder names #67829
Comments
Proposed patch gets rid of uses and mentions of bad dunder names. I.e. names inherited from Python 2: __cmp__, __nonzero__, __getslice__, __unicode__, __div__, etc. They are replaced by correct names (truediv, __floordiv__, __eq__, __bool__, etc) or removed. Also fixed typos and other minor bugs. Also added support for __matmul__ and __getnewargs_ex__ in unittest.mock and added tests for __matmul__. |
See bpo-23581 for __matmul__ support. |
I’m not very familiar with the mock module so can't comment if removing div is sensible there. But all the other changes seem reasonable. I just left a few suggestions for further tweaks on Rietveld. |
Do you want first commit the patch in bpo-23581 Berker? |
I just committed it. Thanks for the review :) |
New changeset 7522bb14e36a by Serhiy Storchaka in branch '3.4': New changeset 9332a545ad85 by Serhiy Storchaka in branch 'default': |
Committed all except changes to multiprocessing.sharedctypes (remove __getslice__ and __setslice__) and unittest.mock (remove __div__, add __getnewargs_ex__). |
New changeset 75cec736f87d by Serhiy Storchaka in branch '3.5': New changeset 4c5f7b61b6c5 by Serhiy Storchaka in branch 'default': |
I'm not sure about removing __getslice__ and __setslice__ from multiprocessing.sharedctypes and __div__ from unittest.mock, and left them as is. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: