[issue46636] Bugs of 2to3 on built-in function or types(classes)

2022-02-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

lib2to3 is going away per https://bugs.python.org/issue40360

but it is behaving as intended above, it does not understand logic.  it was 
only ever intended to maybe work on python 2-only code.  not python 2-and-3 
compatible code.

--
nosy: +gregory.p.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46636] Bugs of 2to3 on built-in function or types(classes)

2022-02-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm not sure what you're trying to accomplish here, but long and unichr are not 
available in python 3.

2to3 has been deprecated and is no longer supported.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46636] Bugs of 2to3 on built-in function or types(classes)

2022-02-04 Thread chen-y0y0


Change by chen-y0y0 :


--
title: Bugs of 2to3 -> Bugs of 2to3 on built-in function or types(classes)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46636] Bugs of 2to3

2022-02-04 Thread chen-y0y0


New submission from chen-y0y0 :

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.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 412508
nosy: prasechen
priority: normal
severity: normal
status: open
title: Bugs of 2to3
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com