[New-bugs-announce] [issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)

Nam report at bugs.python.org
Fri May 19 22:38:07 EDT 2017


New submission from Nam:

currently default_factory does not accept any parameter. This made the default value generated by it constant among keys. If default_factory takes in key as the parameter, it should be able to generate default values based on key, which provide more flexibility to the class defaultdict.

----------
components: Extension Modules
messages: 293992
nosy: namtt
priority: normal
severity: normal
status: open
title: [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30408>
_______________________________________


More information about the New-bugs-announce mailing list