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 justanr
Recipients justanr
Date 2015-02-01.16:19:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422807584.64.0.426042157217.issue23372@psf.upfronthosting.co.za>
In-reply-to
Content
Not something I've noticed until today, but defaultdict.fromkeys only accepts an iterable of keys and an initial value. To set the default_factory for the newly created collection, you need to prod at the attribute itself.

This isn't a huge issue for me, however adding an optional default_factory to fromkeys would be a nice convenience.
History
Date User Action Args
2015-02-01 16:19:44justanrsetrecipients: + justanr
2015-02-01 16:19:44justanrsetmessageid: <1422807584.64.0.426042157217.issue23372@psf.upfronthosting.co.za>
2015-02-01 16:19:44justanrlinkissue23372 messages
2015-02-01 16:19:44justanrcreate