]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update example: Counter.subtract returns None, not self
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 17 Dec 2012 12:01:16 +0000 (14:01 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 17 Dec 2012 12:01:16 +0000 (14:01 +0200)
Doc/library/collections.rst

index 57e04810f758a398f3bb98c51b8dcb8bcc3313a9..f63a853c870c7e0d540fe0534a427a916eda03e7 100644 (file)
@@ -121,6 +121,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