diff options
author | Raymond Hettinger <python@rcn.com> | 2007-12-29 22:16:24 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-12-29 22:16:24 (GMT) |
commit | 81a885af05079e909f2912ebc3d960c43fa30faf (patch) | |
tree | 1e34ec86c440c9656e1f06f2ea4a95bbe1b86059 | |
parent | 5d332bbdee032d6851e252b1238482c14b32212c (diff) | |
download | cpython-81a885af05079e909f2912ebc3d960c43fa30faf.zip cpython-81a885af05079e909f2912ebc3d960c43fa30faf.tar.gz cpython-81a885af05079e909f2912ebc3d960c43fa30faf.tar.bz2 |
Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object().
-rw-r--r-- | Doc/library/itertools.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 9cb316d..788d931 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -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): |