I realized something that makes this even more tricky: dicts are
mutable. So even if the dict contains only string keys at call time, it
could theoretically be changed by the time that keywords are parsed. So
for calling conventions passing dicts, I would leave it to the callee to
sanity check
Thinking about this, I don't believe allowing non-string keys here are a
desirable feature.
It's tempting not to check for this in some cases where it does no harm
(skipping the check shaves a few microseconds off execution time), but I
think the reference manual should require strings here and we
Thanks for the pointer, but that's more about allowing strings which are
not valid identifiers. I'm talking about passing non-strings and more
specifically about the C protocol. For Python functions, non-string
keyword arguments are already disallowed, but that's because of the
implementation o
On 7/9/2019 8:50 AM, Jeroen Demeyer wrote:
On 2019-07-09 14:36, Jeroen Demeyer wrote:
So this leads to the question: should the interpreter check the keys of
a **kwargs dict?
Some pointers:
- https://bugs.python.org/issue8419
- https://bugs.python.org/issue29360
It was also discussed last Oc
On 2019-07-09 14:36, Jeroen Demeyer wrote:
So this leads to the question: should the interpreter check the keys of
a **kwargs dict?
Some pointers:
- https://bugs.python.org/issue8419
- https://bugs.python.org/issue29360
___
Python-Dev mailing list --