[New-bugs-announce] [issue23372] defaultdict.fromkeys should accept a callable factory
Alec Nikolas Reiter
report at bugs.python.org
Sun Feb 1 17:19:44 CET 2015
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 issue for me, however adding an optional default_factory to fromkeys would be a nice convenience.
----------
messages: 235180
nosy: justanr
priority: normal
severity: normal
status: open
title: defaultdict.fromkeys should accept a callable factory
type: behavior
versions: Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23372>
_______________________________________
More information about the New-bugs-announce
mailing list