Steven D'Aprano added the comment:

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.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30408>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to