Michael Foord <[email protected]> added the comment:
I would love this functionality (I almost always initialise defaultdict with a
lambda that just returns a concrete value).
Unfortunately it seems like adding a keyword argument isn't possible because
defaultdict takes arbitrary keyword args (and populates the dict with them).
defaultdict(lambda: 1, foo=1, bar=2, baz=3)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10533>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com