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 9c94cbe commit b391e1aCopy full SHA for b391e1a
Python/bytecodes.c
@@ -1899,7 +1899,7 @@ dummy_func(
1899
if (PyStackRef_IsNull(v)) {
1900
PyObject *localsplusnames = _PyFrame_GetCode(frame)->co_localsplusnames;
1901
PyObject *name = PyTuple_GetItem(localsplusnames, oparg);
1902
- if (PyMapping_HasKeyWithError(BUILTINS(), name) == 1) {
+ if (name && PyMapping_HasKeyWithError(BUILTINS(), name) == 1) {
1903
_PyEval_FormatExcCheckArg(tstate, PyExc_UnboundLocalError,
1904
CANNOT_DELETE_BUILTIN_ERROR_MSG, name);
1905
} else {
0 commit comments