Message294007
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. |
|
Date |
User |
Action |
Args |
2017-05-20 05:51:45 | steven.daprano | set | recipients:
+ steven.daprano, rhettinger, namtt |
2017-05-20 05:51:45 | steven.daprano | set | messageid: <1495259505.66.0.167607260333.issue30408@psf.upfronthosting.co.za> |
2017-05-20 05:51:45 | steven.daprano | link | issue30408 messages |
2017-05-20 05:51:45 | steven.daprano | create | |
|