[Python-Dev] best practices stdlib: purging xrange
Terry 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