mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Update example: Counter.subtract returns None, not self
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user