From: Andrew Svetlov Date: Mon, 17 Dec 2012 12:01:03 +0000 (+0200) Subject: Update example: Counter.subtract returns None, not self X-Git-Tag: v2.7.5~109^2~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78efadb86f1d5e14d788cbffdba63efcb1a07de2;p=python Update example: Counter.subtract returns None, not self --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 661b6aa044..be551dc8a2 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