mirror of
https://github.com/python/cpython.git
synced 2025-09-19 07:00:59 +00:00
assert than we never try to deal with True, False, or None as a name
This commit is contained in:
parent
442f20996d
commit
70b224d8d4
1 changed files with 4 additions and 0 deletions
|
@ -2635,6 +2635,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
||||||
if (!mangled)
|
if (!mangled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
assert(PyUnicode_CompareWithASCIIString(name, "None") &&
|
||||||
|
PyUnicode_CompareWithASCIIString(name, "True") &&
|
||||||
|
PyUnicode_CompareWithASCIIString(name, "False"));
|
||||||
|
|
||||||
op = 0;
|
op = 0;
|
||||||
optype = OP_NAME;
|
optype = OP_NAME;
|
||||||
scope = PyST_GetScope(c->u->u_ste, mangled);
|
scope = PyST_GetScope(c->u->u_ste, mangled);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue