[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Dennis Sweeney
Dennis Sweeney added the comment: PR 21945 changes the signature: - defaultdict(default_factory[, ...]) + defaultdict(default_factory=None, /, [...]) -- ___ Python tracker __

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch nosy: +Dennis Sweeney nosy_count: 3.0 -> 4.0 pull_requests: +21055 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21945 ___ Python tracker

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is intentional behaviour, the factory can only be passed as a positional argument. The documentation[1] mentions this, although its probably possible to write this a bit clearer. [1] https://docs.python.org/3.8/library/collections.html#collections.def

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-23 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-23 Thread Moshe Morad
New submission from Moshe Morad : How to reproduce >>> from collections import defaultdict >>> dd = defaultdict(default_factory=list) >>> dd defaultdict(None, {'default_factory': }) >>> print(dd.default_factory) None Analysis defdict_init(PyObject *self, PyObject *arg