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/073035.html below:

[Python-Dev] best practices stdlib: purging xrange

[Python-Dev] best practices stdlib: purging xrange [Python-Dev] best practices stdlib: purging xrangeTerry Reedy tjreedy at udel.edu
Wed May 9 17:05:36 CEST 2007
""Martin v. Löwis"" <martin at v.loewis.de> wrote in message 
news:4641523A.2070106 at v.loewis.de...
|> Just curious why 2to3 would not replace range() with list(range())?
|
| In most usages of range(), using the 3.0 range() will work just as
| well, and be more efficient.

If so, which it would seem from range2x functionally equal to list(range3), 
then the suggestion of the subject line is backwards.  What should be 
purged eventually is range in for statement headers (or list(range) after 
conversion).

It seems that what some consider best practice now (make a list unless it 
is long and un-needed) is different from what will be best practice in Py3 
(do not make a list unless actually need it).

tjr



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