[Python-Dev] Python 3 as a Default in Linux Distros

Laurent Gautier lgautier at gmail.com
Thu Jul 25 21:16:56 CEST 2013


On 07/25/2013 06:03 PM, Lennart Regebro wrote:
> On Thu, Jul 25, 2013 at 1:53 PM, Laurent Gautier <lgautier at gmail.com> wrote:
>> My meaning was the use of 2to3's machinery (and fire a message if a
>> translation occurs) not 2to3 itself, obviously.
> I don't understand what you mean is the difference.
>
> //Lennart

bullet-point version:

- 2to3 is a code translator

- to function, it needs to identify Python 2-only idioms so they can be 
translated

- the idea _was_ (*) to re-use that engine (identification-only, not 
translation) so the presence of Python 2-only idioms would cause a 
"Python 3 is now the default for "python", buddy. This script was 
seemingly written for Python 2, so you should run it with the command 
python2" sort of error message. The speed issue could be smaller than an 
full run of 2to3 since the error would be triggered at the first snippet 
of Python 2-only code encountered, but *.

(*: I withdrew the suggestion few emails back)

L.


More information about the Python-Dev mailing list