Commit d5b6e66f authored by Raymond Hettinger's avatar Raymond Hettinger

Improve docs for itertools.groupby(). The use of xrange(0) to create a unique...

Improve docs for itertools.groupby().  The use of xrange(0) to create a unique object is less obvious than object().
parent 0645ed47
......@@ -159,7 +159,7 @@ loops that truncate the stream.
key = lambda x: x
self.keyfunc = key
self.it = iter(iterable)
self.tgtkey = self.currkey = self.currvalue = xrange(0)
self.tgtkey = self.currkey = self.currvalue = object()
def __iter__(self):
return self
def next(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment