[Python-3000] Making 2to3 installable

Gregory P. Smith greg at krypto.org
Mon Mar 17 00:12:34 CET 2008


On 3/16/08, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> Guido van Rossum wrote:
> > On Sun, Mar 16, 2008 at 4:22 PM, "Martin v. Löwis" <martin at v.loewis.de>
> wrote:
>
> >>  People would try the process on their development machines, and change
> >>  the code until it actually runs under both versions.
> >>
> >>  I'll be using my sprinting time to find out whether that approach
> >>  can actually work.
> >
> > That would be good. I agree with the ideal process, but I doubt that
> > it will realistically work exactly like that, so I expect that calling
> > 2to3 upon install is just going to cost a lot of CPU time and then
> > produce a non-working install.
>
>
> I was thinking that a comment based "directives" approach ala doctest
> might help with some of the trickier 2->3 migrations. For example,
> allowing someone to write an explicit conversion for a particular line:
>
>    for x, y, in my_izip(s1, s2): # 2to3: for x, y, in zip(s1, s2):
>
> (Dodgy example I know, but it gives the general idea)


thats a good idea.  do we want a comment to contain the alternate code or
should the comment just indicate which way a particular predefined set of
known 2to3 difficult things should be interpreted during conversion?

parallel code is nice.  but long lines will become annoying.  this should
allow for the comment to be on the line below as well maybe?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080316/87754f0d/attachment-0001.htm 


More information about the Python-3000 mailing list