From 78efadb86f1d5e14d788cbffdba63efcb1a07de2 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 17 Dec 2012 14:01:03 +0200 Subject: Update example: Counter.subtract returns None, not self --- Doc/library/collections.rst | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v0.12