On Friday 12 January 2007 19:19, Martin v. Löwis wrote: > Georg Brandl schrieb: > > 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.
There's a couple of ways I see it - we could add a "-3" command line flag to enable 3.x compat, or maybe a from __future__ statement. Although the latter would be a global thing, which is different to how all existing from __future__s work, so probably not good. I don't see a path forward that doesn't involve something painful, so long as 3.0 is going to be the clean break. As I mentioned, though, I'd like as far as possible to make it so that 2.6 (with a flag) can be at least vaguely compatible with 3.0. Anthony -- Anthony Baxter <[EMAIL PROTECTED]> It's never too late to have a happy childhood. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com