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 <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