Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f635172

Browse files
committed
Update example: Counter.subtract returns None, not self
1 parent dfe109e commit f635172

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Doc/library/collections.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ For example::
121121
>>> c = Counter(a=4, b=2, c=0, d=-2)
122122
>>> d = Counter(a=1, b=2, c=3, d=4)
123123
>>> c.subtract(d)
124+
>>> c
124125
Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})
125126

126127
.. versionadded:: 3.2

0 commit comments

Comments
 (0)