mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #28189: dictitems_contains no longer swallows compare errors.
(Patch by Xiang Zhang)
This commit is contained in:
parent
96b2dd5997
commit
7eb1becc25
3 changed files with 30 additions and 1 deletions
|
@ -3654,7 +3654,7 @@ dictitems_contains(_PyDictViewObject *dv, PyObject *obj)
|
|||
return 0;
|
||||
key = PyTuple_GET_ITEM(obj, 0);
|
||||
value = PyTuple_GET_ITEM(obj, 1);
|
||||
found = PyDict_GetItem((PyObject *)dv->dv_dict, key);
|
||||
found = PyDict_GetItemWithError((PyObject *)dv->dv_dict, key);
|
||||
if (found == NULL) {
|
||||
if (PyErr_Occurred())
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue