We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72e7edd commit 29ab5d8Copy full SHA for 29ab5d8
1 file changed
Objects/odictobject.c
@@ -2206,13 +2206,14 @@ update __setitem__
2206
static int
2207
mutablemapping_add_pairs(PyObject *self, PyObject *pairs)
2208
{
2209
+ assert(!PyErr_Occurred());
2210
+
2211
PyObject *pair, *iterator, *unexpected;
2212
int res = 0;
2213
2214
iterator = PyObject_GetIter(pairs);
2215
if (iterator == NULL)
2216
return -1;
- PyErr_Clear();
2217
2218
while ((pair = PyIter_Next(iterator)) != NULL) {
2219
/* could be more efficient (see UNPACK_SEQUENCE in ceval.c) */
0 commit comments