diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-11-08 18:38:54 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-11-08 18:38:54 +0000 |
commit | 326133146f95876a64ae98580aaaab9bbca15790 (patch) | |
tree | c16b4189c0d454a9d9622e85588d6b0f0bc50127 /Python/compile.c | |
parent | 802fd0bdf3e82b5ed491f86e99fb02b9c0ea561b (diff) | |
download | cpython-326133146f95876a64ae98580aaaab9bbca15790.tar.gz |
check for assignment to __debug__ during AST generation
Also, give assignment to None a better error message
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c index 264fdcdc5e..88d54ab944 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2344,12 +2344,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx) PyObject *mangled; /* XXX AugStore isn't used anywhere! */ - /* First check for assignment to __debug__. Param? */ - if ((ctx == Store || ctx == AugStore || ctx == Del) - && !strcmp(PyString_AS_STRING(name), "__debug__")) { - return compiler_error(c, "can not assign to __debug__"); - } - mangled = _Py_Mangle(c->u->u_private, name); if (!mangled) return 0; |