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 SilentGhost, justanr, rhettinger
Date 2015-02-01.18:38:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422815911.9.0.457206103108.issue23372@psf.upfronthosting.co.za>
In-reply-to
Content
@SilentGhost I was playing with a voting algorithm (Instant Runoff, rather than traditional majority). Ultimately, I ended up using Counter in place of a defaultdict, but that's how I ended up noticing it.

Not so much ensuring the content so much as setting an initial default state to mutate.

@rhettinger I had considered a comprehension and passing it into a defaultdict (or Counter) to get that nice missing key handling.

Implicitly assigning the factory is a pretty good compromise, like I said fromkeys accepting the factory would be a nice convenience rather than correcting a major oversight.
History
Date User Action Args
2015-02-01 18:38:31justanrsetrecipients: + justanr, rhettinger, SilentGhost
2015-02-01 18:38:31justanrsetmessageid: <1422815911.9.0.457206103108.issue23372@psf.upfronthosting.co.za>
2015-02-01 18:38:31justanrlinkissue23372 messages
2015-02-01 18:38:31justanrcreate