A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-May/073023.html below:

[Python-Dev] best practices stdlib: purging xrange

[Python-Dev] best practices stdlib: purging xrange [Python-Dev] best practices stdlib: purging xrangeGuido van Rossum guido at python.org
Tue May 8 04:09:54 CEST 2007
On 5/7/07, Terry Reedy <tjreedy at udel.edu> wrote:
>
> "Guido van Rossum" <guido at python.org> wrote in message
> news:ca471dc20705071703p54a9afc3yfe9693c5fe6e2f23 at mail.gmail.com...
> | But why bother? The 2to3 converter can do this for you.
> |
> | In a sense using range() is more likely to produce broken results in
> | 3.0: if your code depends on the fact that range() returns a list, it
> | is broken in 3.0, and 2to3 cannot help you here. But if you use
> | list(xrange()) today, the converter will turn this into list(range())
> | in 3.0 and that will continue to work correctly.
>
> Just curious why 2to3 would not replace range() with list(range())?

That's a good idea. But I'd like someone else to implement it...

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4