[Python-checkins] Use existing unbound_local_error label in DELETE_FAST opcode (GH-30882)

markshannon webhook-mailer at python.org
Wed Jan 26 08:58:37 EST 2022


https://github.com/python/cpython/commit/1e8a3a5579c9a96a45073b24d1af2dbe3039d366
commit: 1e8a3a5579c9a96a45073b24d1af2dbe3039d366
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: markshannon <mark at hotpy.org>
date: 2022-01-26T13:58:28Z
summary:

Use existing unbound_local_error label in DELETE_FAST opcode (GH-30882)

files:
M Python/ceval.c

diff --git a/Python/ceval.c b/Python/ceval.c
index 0a6fc4a20660b..29ca5e3750cc0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3107,12 +3107,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
                 SETLOCAL(oparg, NULL);
                 DISPATCH();
             }
-            format_exc_check_arg(
-                tstate, PyExc_UnboundLocalError,
-                UNBOUNDLOCAL_ERROR_MSG,
-                PyTuple_GetItem(frame->f_code->co_localsplusnames, oparg)
-                );
-            goto error;
+            goto unbound_local_error;
         }
 
         TARGET(MAKE_CELL) {



More information about the Python-checkins mailing list