Serhiy Storchaka added the comment:

I think this kills the optimization effect for non-dicts.

See on PyDict_Merge(). It takes the boolean parameter that controls the 
behavior in case of matching keys. I think the best would be to rename it to 
say _PyDict_MergeEx(), extend the boolean parameter to ternary parameter, and 
raise an exception if it is in the third state and matching keys are found. 
PyDict_Merge() would be implemented as a simple wrapper around 
_PyDict_MergeEx(). We should check wherever this affects the performance of 
dict.update().

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27358>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to