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 vstinner
Recipients benjamin.peterson, jondaa, vstinner, xtreak
Date 2019-02-26.16:30:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551198629.66.0.147737628217.issue35417@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-02-26 16:30:29vstinnersetrecipients: + vstinner, benjamin.peterson, xtreak, jondaa
2019-02-26 16:30:29vstinnersetmessageid: <1551198629.66.0.147737628217.issue35417@roundup.psfhosted.org>
2019-02-26 16:30:29vstinnerlinkissue35417 messages
2019-02-26 16:30:29vstinnercreate