8 Mar
2017
8 Mar
'17
10:23 p.m.
That's already valid dict syntax.
dict(default=int) {'default': <type 'int'>}
Generally that in itself makes this a no go. Mahmoud On Wed, Mar 8, 2017 at 2:09 PM, Steven Piantadosi <spiantado@gmail.com> wrote:
Hi All,
I find importing defaultdict from collections to be clunky and it seems like having a default should just be an optional keyword to dict. Thus, something like,
d = dict(default=int)
would be the same as
from collections import defaultdict d = defaultdict(int)
Any thoughts?
Thanks,
++Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/