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.

classification
Title: 2to3: reassignment to bool is left in the file
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, jaraco
Priority: normal Keywords:

Created on 2011-03-14 16:00 by jaraco, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg130838 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2011-03-14 16:00
Consider the Python file

    #!python
    True = 1
    False = 0

The 2to3 script returns an empty diff for this file.

These lines (especially when the values are canonical), are clearly for backward compatibility to early Python 2.x editions (2.2.1 and earlier).

These statements cause an error in Python 3. It would be nice if 2to3 could either remove these lines or log a warning.
msg130854 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-03-14 16:54
That seems awfully obscure.
msg130855 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2011-03-14 16:57
Agreed.

I encountered it in https://github.com/dottedmag/path.py, which has since been "patched" by removing the compatibility clauses, but that means that Python 2.2.1 and earlier are no longer supported by the project.

If it's not worth the trouble of adding, just close with won't fix. I only suggest it because I encountered it and others might as well.
msg130858 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-03-14 17:07
Okay. This is certainly the first request I've seen, so I'm going to close.
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55708
2011-03-14 17:07:19benjamin.petersonsetstatus: open -> closed

messages: + msg130858
resolution: rejected
2011-03-14 16:57:24jaracosetmessages: + msg130855
2011-03-14 16:54:49benjamin.petersonsetmessages: + msg130854
2011-03-14 16:02:03ezio.melottisetnosy: + benjamin.peterson

title: reassignment to bool is left in the file -> 2to3: reassignment to bool is left in the file
2011-03-14 16:00:34jaracocreate