This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shiyuchong
Recipients shiyuchong
Date 2019-07-16.05:30:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org>
In-reply-to
Content
An easy problem.
It seems like nonzero fixer can only fix definition, not usage. nonzero fixer cannot fix problems like below:
 a = 1
 a.__nonzero__()
And there are no cases of __nonzero__() usage in test cases from test_fixers.py.(all cases test only definition rename)
It might not be a bug, since in DOC it just says "rename", not "convert". (If it is not a bug, the doc must be considered to be kinds of confusing and should add additional description.)but adding this automatic transformation is really useful in my current work, so at least an optional fixer is needed for 2to3.
A fixer of __oct__(),__hex__() to oct(),hex() is also in need, but 2to3 lacks such fixer.
History
Date User Action Args
2019-07-16 05:30:27shiyuchongsetrecipients: + shiyuchong
2019-07-16 05:30:27shiyuchongsetmessageid: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org>
2019-07-16 05:30:27shiyuchonglinkissue37602 messages
2019-07-16 05:30:26shiyuchongcreate