bpo-42152: Use PyDict_Contains and PyDict_SetDefault if appropriate. (GH-22986)
If PyDict_GetItemWithError is only used to check whether the key is in dict, it is better to use PyDict_Contains instead. And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can replace the combination.
S
Serhiy Storchaka committed
b510e101f8b5b31276bf97b921ca9247162881d2
Parent: fb5db7e
Committed by GitHub <noreply@github.com>
on 10/26/2020, 10:47:57 AM