commit | 2e4c899e2d28f2acbd62f7b1353dd96df803d911 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue May 12 20:27:36 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue May 12 20:27:36 1998 +0000 |
tree | 7cd67ce6413032f895835f29a8c18c214f0ef08a | |
parent | 1a87e9d708dae6936e87ffcb8e73515c2099efdc [diff] [blame] |
DELETE_FAST should issue an exception when the local variable is undefined.
diff --git a/Python/ceval.c b/Python/ceval.c index 0527537..7c358db 100644 --- a/Python/ceval.c +++ b/Python/ceval.c
@@ -1337,6 +1337,13 @@ continue; case DELETE_FAST: + x = GETLOCAL(oparg); + if (x == NULL) { + PyErr_SetObject(PyExc_NameError, + PyTuple_GetItem(co->co_varnames, + oparg)); + break; + } SETLOCAL(oparg, NULL); continue;