
29 Jun
2018
29 Jun
'18
12:37 a.m.
On Jun 28, 2018, at 5:30 PM, Chris Barker - NOAA Federal chris.barker@noaa.gov wrote:
So maybe a solution is an accumulator special case of defaultdict — it uses a list be default and appends by default.
Almost like counter...
Which, of course, is pretty much what your proposal is.
Which makes me think — a new classmethod on the builtin dict is a pretty heavy lift compared to a new type of dict in the collections module.
-CHB