This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients holdenweb, lukasz.langa, michael.foord
Date 2010-11-25.17:07:22
SpamBayes Score 2.7183542e-05
Marked as misclassified No
Message-id <1290704844.19.0.0527518216786.issue10533@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2010-11-25 17:07:24michael.foordsetrecipients: + michael.foord, holdenweb, lukasz.langa
2010-11-25 17:07:24michael.foordsetmessageid: <1290704844.19.0.0527518216786.issue10533@psf.upfronthosting.co.za>
2010-11-25 17:07:22michael.foordlinkissue10533 messages
2010-11-25 17:07:22michael.foordcreate