[issue29312] Use FASTCALL in dict.update()
Jeroen Demeyer
report at bugs.python.org
Thu Jul 4 08:22:14 EDT 2019
Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:
You are correct that PyDict_Merge() does not need to recompute the hashes of the keys. However, your example doesn't work because you need string keys for **kwargs. The "str" class caches its hash, so you would need a dict with a "str" subclass as keys to hit that problem.
I think that calling d.update(**kw) with kw having str-subclass keys should be very rare. I'm not sure that we should care about that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29312>
_______________________________________
More information about the Python-bugs-list
mailing list