Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

@xtreak __init__ delegates work to update() which has the same behavior:

Python 3.7.2 (default, Feb 12 2019, 08:15:36)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Counter
>>> d = Counter()
>>> d.update(a=0)
>>> d
Counter({'a': 0})


If we want to keep this behavior could we keep an internal list of keys whose 
value is 0 that we append to at 
https://github.com/python/cpython/blob/master/Lib/collections/__init__.py#L652 
so we doing operations we just check values of keys which are updated and the 
content of this list?

----------
nosy: +remi.lapeyre

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to