summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 12:01:45 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 12:01:45 (GMT)
commit84188c891cf6e76d9b34cbe09cac713fd349e3da (patch)
tree19aaee73a591339c87557e3f2acd6bf62393df44
parent57d0a536b2e8085e50ac00c05822eda4c85a822e (diff)
parent7c42398f3bcc1f9ad1a7ac9e2149754a9e6f334a (diff)
downloadcpython-84188c891cf6e76d9b34cbe09cac713fd349e3da.zip
cpython-84188c891cf6e76d9b34cbe09cac713fd349e3da.tar.gz
cpython-84188c891cf6e76d9b34cbe09cac713fd349e3da.tar.bz2
Update example: Counter.subtract returns None, not self
-rw-r--r--Doc/library/collections.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 45da4e5..6ef114e 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -279,6 +279,7 @@ For example::
>>> c = Counter(a=4, b=2, c=0, d=-2)
>>> d = Counter(a=1, b=2, c=3, d=4)
>>> c.subtract(d)
+ >>> c
Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})
.. versionadded:: 3.2