diff options
| author | Benjamin Peterson <benjamin@python.org> | 2012-12-06 17:49:58 -0500 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2012-12-06 17:49:58 -0500 |
| commit | 114832065bf0892650154c391093095d8d950c25 (patch) | |
| tree | 507198d5b663abd29218bd7ca6b7a945f50ed27b /Python | |
| parent | 8fbf4fa9edcb9efd1ca5d650ed235eb4770dea3a (diff) | |
| download | cpython-114832065bf0892650154c391093095d8d950c25.tar.gz | |
assert than we never try to deal with True, False, or None as a name
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 3e960ccbfe..8f876a6d0d 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2635,6 +2635,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx) if (!mangled) return 0; + assert(PyUnicode_CompareWithASCIIString(name, "None") && + PyUnicode_CompareWithASCIIString(name, "True") && + PyUnicode_CompareWithASCIIString(name, "False")); + op = 0; optype = OP_NAME; scope = PyST_GetScope(c->u->u_ste, mangled); |
