mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Update example: Counter.subtract returns None, not self
This commit is contained in:
parent
dfe109e33f
commit
f635172c72
1 changed files with 1 additions and 0 deletions
|
|
@ -121,6 +121,7 @@ For example::
|
||||||
>>> c = Counter(a=4, b=2, c=0, d=-2)
|
>>> c = Counter(a=4, b=2, c=0, d=-2)
|
||||||
>>> d = Counter(a=1, b=2, c=3, d=4)
|
>>> d = Counter(a=1, b=2, c=3, d=4)
|
||||||
>>> c.subtract(d)
|
>>> c.subtract(d)
|
||||||
|
>>> c
|
||||||
Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})
|
Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6})
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue