summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 8d0e6a4..9c17be7 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1810,8 +1810,7 @@ dict_pop(PyDictObject *mp, PyObject *args)
Py_INCREF(deflt);
return deflt;
}
- PyErr_SetString(PyExc_KeyError,
- "pop(): dictionary is empty");
+ set_key_error(key);
return NULL;
}
if (!PyUnicode_CheckExact(key) ||