[Python-checkins] cpython: assert than we never try to deal with True, False, or None as a name
benjamin.peterson
python-checkins at python.org
Thu Dec 6 23:50:05 CET 2012
http://hg.python.org/cpython/rev/0238cc842805
changeset: 80739:0238cc842805
user: Benjamin Peterson <benjamin at python.org>
date: Thu Dec 06 17:49:58 2012 -0500
summary:
assert than we never try to deal with True, False, or None as a name
files:
Python/compile.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Python/compile.c b/Python/compile.c
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2635,6 +2635,10 @@
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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list