[Python-ideas] Create Python 2.8 as a transition step to Python 3.x

Philipp A. flying-sheep at web.de
Tue Jan 21 09:20:38 CET 2014


you’ll have to do quite a bit:

# -*- coding: utf-8 -*-from __future__ import print_function,
division, unicode_literals, absolute_import
from io import open

range = xrange
str = unicode
basestring = (str, bytes)  #for isinstance()



2014/1/21 Eric V. Smith <eric at trueblade.com>

> On 1/19/2014 10:40 PM, Bruce Leban wrote:
> > I think the odds of Python getting
> >
> >         from __future__ import pony
> >
> > are slightly higher than there being a Python 2.8. I assume by "pony"
> > you really mean what I'd like to have:
> >
> >         from __future__ import everything
> >
> > since my goal is to write Python 3 compatible code even though I'm
> > temporarily stuck with Python 2 due to stack issues. The __future__
> > imports makes it easier to write forward compatible code. As it is, I
> > have to list the individual imports in every file and I also add:
> >
> >         range = xrange
>
> It's unfortunate we didn't add this (and all other changed builtins) to
> future_builtins in 2.7.
>
> Eric.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140121/ff3942f6/attachment.html>


More information about the Python-ideas mailing list