Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object().

This commit is contained in:
Raymond Hettinger 2007-12-29 22:16:24 +00:00
parent 5d332bbdee
commit 81a885af05
1 changed files with 1 additions and 1 deletions

View File

@ -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):