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 would do well to tighten the implementation. We may find though that this has accidentally become a gray area that some code has come to depend on, so we may have to deprecate it. This really depends on how much code depends on it though, there's no strict rule for such cases. On Tue, Jul 9, 2019 at 9:42 AM Jeroen Demeyer <j.deme...@ugent.be> wrote: > 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 of the "function" object, it's not enforced by the > CPython core. > > Jeroen. > _______________________________________________ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/JSAQAZD2GREBH72VCHO5ZZJQSYQHLTOV/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him/his **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BITO2WT5CE43JCCY2BFXDRCEHKYK3FJF/