summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-14 02:16:20 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-14 02:16:20 (GMT)
commit234e260d5ed827364c733bf086d68c4395c0d9e6 (patch)
treee373907fd93d32fed9155b933daddf96468356c7 /Python/ceval.c
parente23eb57f08aa3f2f379757ed3d97fbf3188a1704 (diff)
downloadcpython-234e260d5ed827364c733bf086d68c4395c0d9e6.zip
cpython-234e260d5ed827364c733bf086d68c4395c0d9e6.tar.gz
cpython-234e260d5ed827364c733bf086d68c4395c0d9e6.tar.bz2
Since PyDict_GetItem() can't raise an exception any more, there's no
need to call PyErr_Clear() when it returns NULL.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 7c358db..cffe89a 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1287,10 +1287,8 @@ eval_code2(co, globals, locals,
}
x = PyDict_GetItem(x, w);
if (x == NULL) {
- PyErr_Clear();
x = PyDict_GetItem(f->f_globals, w);
if (x == NULL) {
- PyErr_Clear();
x = PyDict_GetItem(f->f_builtins, w);
if (x == NULL) {
PyErr_SetObject(
@@ -1307,7 +1305,6 @@ eval_code2(co, globals, locals,
w = GETNAMEV(oparg);
x = PyDict_GetItem(f->f_globals, w);
if (x == NULL) {
- PyErr_Clear();
x = PyDict_GetItem(f->f_builtins, w);
if (x == NULL) {
PyErr_SetObject(PyExc_NameError, w);