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 steven.daprano
Recipients namtt, rhettinger, steven.daprano
Date 2017-05-20.05:51:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495259505.66.0.167607260333.issue30408@psf.upfronthosting.co.za>
In-reply-to
Content
I think this should be closed. For backwards compatibility, the defaultdict default_factory function must remain as it is. There is lots of code that uses something like `int` or `list` as the factory, and if the missing key was to be passed, the code would break.

As Raymond says, if you need the key passed to your factory, you can subclass dict and give it a __missing__ method.
History
Date User Action Args
2017-05-20 05:51:45steven.dapranosetrecipients: + steven.daprano, rhettinger, namtt
2017-05-20 05:51:45steven.dapranosetmessageid: <1495259505.66.0.167607260333.issue30408@psf.upfronthosting.co.za>
2017-05-20 05:51:45steven.dapranolinkissue30408 messages
2017-05-20 05:51:45steven.dapranocreate