mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
GH-100719: Remove the co_nplaincellvars
field from code objects. (GH-100721)
This commit is contained in:
parent
c31e356a10
commit
15aecf8dd7
10 changed files with 19 additions and 23 deletions
|
@ -3417,7 +3417,7 @@ format_exc_unbound(PyThreadState *tstate, PyCodeObject *co, int oparg)
|
|||
if (_PyErr_Occurred(tstate))
|
||||
return;
|
||||
name = PyTuple_GET_ITEM(co->co_localsplusnames, oparg);
|
||||
if (oparg < co->co_nplaincellvars + co->co_nlocals) {
|
||||
if (oparg < PyCode_GetFirstFree(co)) {
|
||||
format_exc_check_arg(tstate, PyExc_UnboundLocalError,
|
||||
UNBOUNDLOCAL_ERROR_MSG, name);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue