9 Mar
2017
9 Mar
'17
4:08 p.m.
On Mar 08, 2017, at 05:49 PM, Eric V. Smith wrote:
If we really want to make defaultdict feel more "builtin" (and I don't see any reason to do so), I'd suggest adding a factory function:
dict.defaultdict(int)
Similar in spirit to dict.fromkeys(), except of course returning a defauldict, not a dict.
Nice. -Barry