Message336691
I suggest to close this issue as WONTFIX.
2to3 is designed as a tool to convert a Python 2 code base to Python 3 at once. I understand that once the code base is converted, you may want to revert some unwanted "useless" changes.
Python 2 and Python 3 languages have some intersections where it's hard to guess if the code is valid or not in Python 3. 2to3 uses heuristic which implements practical solutions. And you noticed, there are some corner cases where 2to3 generates useless changes.
IMHO 2to3 is fine. It may be nice to enhance it, but well, it's a trade-off, it's good as it is.
You may want to test other tools like modernize, 2to6, sixer, etc. which made different trade-offs.
Note: I'm the author of sixer and I'm not a big of 2to3 since it drops Python 2 support and generate many changes which are not needed since Python 3.2. |
|
Date |
User |
Action |
Args |
2019-02-26 16:30:29 | vstinner | set | recipients:
+ vstinner, benjamin.peterson, xtreak, jondaa |
2019-02-26 16:30:29 | vstinner | set | messageid: <1551198629.66.0.147737628217.issue35417@roundup.psfhosted.org> |
2019-02-26 16:30:29 | vstinner | link | issue35417 messages |
2019-02-26 16:30:29 | vstinner | create | |
|