5 Jun
2002
5 Jun
'02
4:21 a.m.
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