diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-17 12:01:03 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-17 12:01:03 (GMT) |
commit | 78efadb86f1d5e14d788cbffdba63efcb1a07de2 (patch) | |
tree | 9439964b8dbfb7d7b3933b65743dc441653f0626 | |
parent | bc453ca81df0605b32f05f64cd6059c20448e1e5 (diff) | |
download | cpython-78efadb86f1d5e14d788cbffdba63efcb1a07de2.zip cpython-78efadb86f1d5e14d788cbffdba63efcb1a07de2.tar.gz cpython-78efadb86f1d5e14d788cbffdba63efcb1a07de2.tar.bz2 |
Update example: Counter.subtract returns None, not self
-rw-r--r-- | Doc/library/collections.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 661b6aa..be551dc 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -120,6 +120,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}) The usual dictionary methods are available for :class:`Counter` objects |