New submission from 徐靖 <shiyucho...@gmail.com>: 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.
---------- components: 2to3 (2.x to 3.x conversion tool) messages: 348002 nosy: shiyuchong priority: normal severity: normal status: open title: nonzero fixer problem type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37602> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com