]> granicus.if.org Git - python/commitdiff
Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object...
authorRaymond Hettinger <python@rcn.com>
Sat, 29 Dec 2007 22:16:24 +0000 (22:16 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 29 Dec 2007 22:16:24 +0000 (22:16 +0000)
Doc/library/itertools.rst

index 9cb316d56631a0a1bba893bb9ffd8904bd7f6f70..788d931c2841dd94f2b41fd10c1927dedd207a90 100644 (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):