mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Since PyDict_GetItem() can't raise an exception any more, there's no
need to call PyErr_Clear() when it returns NULL.
This commit is contained in:
parent
e23eb57f08
commit
234e260d5e
2 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue