Message348002
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. |
|
Date |
User |
Action |
Args |
2019-07-16 05:30:27 | shiyuchong | set | recipients:
+ shiyuchong |
2019-07-16 05:30:27 | shiyuchong | set | messageid: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> |
2019-07-16 05:30:27 | shiyuchong | link | issue37602 messages |
2019-07-16 05:30:26 | shiyuchong | create | |
|