[Python-3000] Making 2to3 installable
Nick Coghlan
ncoghlan at gmail.com
Sun Mar 16 23:57:55 CET 2008
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)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list