[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Alec Nikolas Reiter
Alec Nikolas Reiter added the comment: @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 mu

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Alec Nikolas Reiter
New submission from Alec Nikolas Reiter: 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