Message338465
| Author | remi.lapeyre |
|---|---|
| Recipients | Nikita Smetanin, remi.lapeyre, rhettinger, xtreak |
| Date | 2019-03-20.12:58:40 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1553086720.62.0.430252851809.issue36380@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
@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? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-03-20 12:58:40 | remi.lapeyre | set | recipients: + remi.lapeyre, rhettinger, xtreak, Nikita Smetanin |
| 2019-03-20 12:58:40 | remi.lapeyre | set | messageid: <1553086720.62.0.430252851809.issue36380@roundup.psfhosted.org> |
| 2019-03-20 12:58:40 | remi.lapeyre | link | issue36380 messages |
| 2019-03-20 12:58:40 | remi.lapeyre | create | |