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 prasechen
Recipients prasechen
Date 2022-02-04.14:49:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643986176.49.0.812119099931.issue46636@roundup.psfhosted.org>
In-reply-to
Content
I have a file named foo.py:
try :
    input = raw_input
    int = long
    chr = unichr
    range = xrange
except NameError :
    pass

When I process this file to 2to3, it shows:
--- foo.py (original)
+++ foo.py (refactored)
@@ -1,7 +1,7 @@
 try :
     input = raw_input
-    int = long
-    chr = unichr
+    int = int
+    chr = chr
     range = xrange
except NameError :
    pass
RefactoringTool: Files that need to be modified:
RefactoringTool: foo.py

I don't know why it modifies the Python 2.x and 3.x compatible code.
History
Date User Action Args
2022-02-04 14:49:36prasechensetrecipients: + prasechen
2022-02-04 14:49:36prasechensetmessageid: <1643986176.49.0.812119099931.issue46636@roundup.psfhosted.org>
2022-02-04 14:49:36prasechenlinkissue46636 messages
2022-02-04 14:49:36prasechencreate