summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-12-29 22:16:24 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-12-29 22:16:24 (GMT)
commit81a885af05079e909f2912ebc3d960c43fa30faf (patch)
tree1e34ec86c440c9656e1f06f2ea4a95bbe1b86059
parent5d332bbdee032d6851e252b1238482c14b32212c (diff)
downloadcpython-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.rst2
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):