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

index 661b6aa044882f82ca123e02a4ed3fa7d7d4ac32..be551dc8a2cd71a35a39f904bbcd476f1cfc1f2d 100644 (file)
@@ -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