[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemWithError()

Serhiy Storchaka report at bugs.python.org
Mon Oct 26 03:50:36 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The code uses also _PyDict_ContainsId() added in issue42006 instead of _PyDict_GetItemIdWithError().

Few uses of _PyDict_GetItemStringWithError() are left as is. I do not think it is worth to introduce _PyDict_ContainsString(). They could be rewritten using _PyDict_ContainsId() if we find it worth.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42152>
_______________________________________


More information about the Python-bugs-list mailing list