[issue35634] kwargs regression when there are multiple entries with the same key
Rémi Lapeyre
report at bugs.python.org
Wed Jan 2 08:05:44 EST 2019
Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:
I prepared a patch to make the check when there is only one dict, it may be the less surprising change.
BTW, I got lost when looking for the root cause of this change because grepping for the error message did not work as it has line breaks:
- PyErr_Format(PyExc_TypeError,
- "%.200s%.200s got multiple "
- "values for keyword argument '%U'",
- PyEval_GetFuncName(func),
- PyEval_GetFuncDesc(func),
- key);
Can we add a note like https://www.kernel.org/doc/html/v4.12/process/coding-style.html#breaking-long-lines-and-strings to the PEP7?
> However, never break user-visible strings such as printk messages, because that breaks the ability to grep for them.
It would help in such situations.
----------
nosy: +remi.lapeyre
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35634>
_______________________________________
More information about the Python-bugs-list
mailing list