[issue35634] kwargs regression when there are multiple entries with the same key

Ammar Askar report at bugs.python.org
Wed Jan 2 03:03:07 EST 2019


Ammar Askar <ammar at ammaraskar.com> added the comment:

This change in difference is caused by https://github.com/python/cpython/commit/e036ef8fa29f27d57fe9f8cef8d931d4122d8223

The old code checked for duplicate arguments by essentially running `set().intersection(d)` and since `set().intersection(['a', 'a'])` is the empty set, it doesn't register as a duplicated argument. The newer code iterates over the keys in order to merge the dictionaries.

Note however that 3.5 is now is in security only mode: https://devguide.python.org/#branchstatus so its unlikely this behavior will be back-ported.

----------
nosy: +ammar2
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35634>
_______________________________________


More information about the Python-bugs-list mailing list