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@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@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/