A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-March/034189.html below:

[Python-Dev] Re: More int/long integration issues

[Python-Dev] Re: More int/long integration issues [Python-Dev] Re: More int/long integration issuesGuido van Rossum guido@python.org
Fri, 21 Mar 2003 09:55:16 -0500
> > Hm, maybe range() shouldn't be an iterator but an interator
> > generator.  No time to explain; see the discussion about restartable
> > iterators.
> 
> I think what you mean is fairly obvious.  list et al. are iterator
> generators, right?  It's just a thing with an __iter__ function which
> produces an iterator?
> 
> If so, I tend to agree that's the right behavior for range().
> range(x,y,z) should be an immutable object.

Yes.  Idioms like this are used fairly often:

  seq = range(...)

  for i in seq: ...
  for i in seq: ...
  # etc.

--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