[Python-Dev] [Python-3000] Warning for 2.6 and greater

Georg Brandl g.brandl at gmx.net
Fri Jan 12 15:17:25 CET 2007


Martin v. Löwis schrieb:
> Georg Brandl schrieb:
>>> If Python 3.0 was simply a release which removed deprecated features,  
>>> there would clearly be no issue. I would update my code in advance of  
>>> the 3.0 release to not use any of those features being removed, and  
>>> I'm all set. But that's not what I'm hearing. Python 3 is both adding  
>>> new ways to do things, and removing the older way, in the same  
>>> version, with no overlap. This makes me very anxious.
>> 
>> It has always been planned that in those cases that allow it, the new way to do
>> it will be introduced in a 2.x release too, and the old way removed only in 3.x.
> 
> What does that mean for the example James gave: if dict.items is going
> to be an iterator in 3.0, what 2.x version can make it return an
> iterator, when it currently returns a list?
> 
> There simply can't be a 2.x version that *introduces* the new way, as it
> is not merely a new API, but a changed API.

Well, that is one of the cases in which that won't be possible ;)

But e.g. moved methods, libraries or new syntax are areas where changes can
be introduced in 2.x (in case of new syntax with a __future__ statement,
of course).

Georg



More information about the Python-Dev mailing list