summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-12-06 22:49:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-12-06 22:49:58 (GMT)
commit70b224d8d4b7ab1dfa249510d8d6e6e53468f75c (patch)
treeebdb40ff893f4e1699be824b11b216cd6631fae3 /Python
parent442f20996dcd994d1024e5cad7f66a4595352eb2 (diff)
downloadcpython-70b224d8d4b7ab1dfa249510d8d6e6e53468f75c.zip
cpython-70b224d8d4b7ab1dfa249510d8d6e6e53468f75c.tar.gz
cpython-70b224d8d4b7ab1dfa249510d8d6e6e53468f75c.tar.bz2
assert than we never try to deal with True, False, or None as a name
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 3e960cc..8f876a6 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);