[Python-ideas] from __future__ import range

Nick Coghlan ncoghlan at gmail.com
Tue Apr 21 14:13:40 CEST 2009

spir wrote:
> I think that
>    from __future__ import range
> used together with
>    list(range(...))
> would:
> -1- Be a good programming practice,
> -2- Help & remove one of the 2to3 issues that cannot be solved automatically.

__future__ is really only for things that the compiler needs to know about.

However, adding a "range = xrange" line to Lib\future_builtins.py in 2.7
probably wouldn't be a bad idea.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list