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/2002-June/025021.html below:

[Python-Dev] xrange identity crisis

[Python-Dev] xrange identity crisis [Python-Dev] xrange identity crisisGuido van Rossum guido@python.org
Tue, 04 Jun 2002 21:22:30 -0400
> The main defense is that the typical use case is 
> 
> for i in xrange(len(some_list))
> 
> In that case, it is desirable not to create an additional object, and
> nobody will notice the difference.

Is it really so bad if this allocates *two* objects instead of one?

I think that's the only to get my example to work correctly.  And it
*has* to work correctly.

If two objects are created anyway, I agree with Oren that it's better
to have a separate range-iterator object type.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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