[Python-Dev] xrange identity crisis

Oren Tirosh oren-py-d@hishome.net
Wed, 5 Jun 2002 12:21:23 +0300


On Tue, Jun 04, 2002 at 04:57:58PM -0400, Raymond Hettinger wrote:
> Being immutable, xrange had the advantage that it could serve as its own
> iterator and did not require the extra code needed for list iterators and
> dict iterators.

In its current form, xrange is no longer immutable. It has state information
and calling the next() method of an xrange object modifies it.

I guess the difference between us is that you are concerned with what works 
while I am irrationally obsessed with semantics :-)

	Oren