On Sun, Mar 16, 2008 at 6:12 PM, Gregory P. Smith <[EMAIL PROTECTED]> wrote:
> On 3/16/08, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> > Guido van Rossum wrote:
> > > On Sun, Mar 16, 2008 at 4:22 PM, "Martin v. Löwis" <[EMAIL PROTECTED]>
> 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?

I think the parallel code idea is too complex. 2to3 doesn't really
think in terms of lines anyway. I think we should just have a
directive to prevent 2to3 from applying a certain fixer to the line
containing the directive.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to