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()
On 1/19/2014 10:40 PM, Bruce Leban wrote:It's unfortunate we didn't add this (and all other changed builtins) to
> 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
future_builtins in 2.7.
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/