From: Benjamin Peterson Date: Thu, 6 Dec 2012 22:49:58 +0000 (-0500) Subject: assert than we never try to deal with True, False, or None as a name X-Git-Tag: v3.4.0a1~1897 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70b224d8d4b7ab1dfa249510d8d6e6e53468f75c;p=python assert than we never try to deal with True, False, or None as a name --- 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);