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 | 2c98faada6f268d32c4031f7d09d9d5e6a2f46e3 (patch) | |
tree | b5555e4413d2df2147f15a12e563e83261564926 /Python/compile.c | |
parent | 942e4779b05dbf382e9b59a56a31ba311fa6e4d5 (diff) | |
download | cpython-git-2c98faada6f268d32c4031f7d09d9d5e6a2f46e3.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; |