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

[Python-Dev] best practices stdlib: purging xrange

[Python-Dev] best practices stdlib: purging xrangeJames Y Knight foom at fuhm.net
Tue May 8 17:18:44 CEST 2007
On May 8, 2007, at 8:49 AM, Armin Rigo wrote:
> On Tue, May 08, 2007 at 09:14:02AM +1000, Anthony Baxter wrote:
>> I'd like to suggest that we remove all (or nearly all) uses of
>> xrange from the stdlib. A quick scan shows that most of the usage
>> of it is unnecessary. With it going away in 3.0, and it being
>> informally deprecated anyway, it seems like a good thing to go away
>> where possible.
>
> I personally think that replacing these with range() is a clean-up,  
> but
> I also know that not everybody agrees to that.  So: should we, or  
> should
> we not, replace xrange() with range() as a matter of clean-up when the
> difference between the two is really completely irrelevant?

But doesn't doing this now this make the conversion to Py3 *harder*?  
If 2to3 is going to rewrite xrange() as range(), and range() to list 
(range()), then moving towards xrange where possible would actually  
be preferable, wouldn't it? Or is there no plan to run 2to3 on the  
stdlib?

James

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