[Python-3000-checkins] r67172 - in python/branches/py3k: Python/ast.c Python/compile.c
benjamin.peterson
python-3000-checkins at python.org
Sat Nov 8 20:56:21 CET 2008
Author: benjamin.peterson
Date: Sat Nov 8 20:56:21 2008
New Revision: 67172
Log:
Merged revisions 67171 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67171 | benjamin.peterson | 2008-11-08 12:38:54 -0600 (Sat, 08 Nov 2008) | 4 lines
check for assignment to __debug__ during AST generation
Also, give assignment to None a better error message
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Python/ast.c
python/branches/py3k/Python/compile.c
Modified: python/branches/py3k/Python/ast.c
==============================================================================
--- python/branches/py3k/Python/ast.c (original)
+++ python/branches/py3k/Python/ast.c Sat Nov 8 20:56:21 2008
@@ -354,6 +354,7 @@
"None",
"True",
"False",
+ "__debug__",
NULL,
};
Modified: python/branches/py3k/Python/compile.c
==============================================================================
--- python/branches/py3k/Python/compile.c (original)
+++ python/branches/py3k/Python/compile.c Sat Nov 8 20:56:21 2008
@@ -2498,12 +2498,6 @@
PyObject *mangled;
/* XXX AugStore isn't used anywhere! */
- /* First check for assignment to __debug__. Param? */
- if ((ctx == Store || ctx == AugStore || ctx == Del)
- && !PyUnicode_CompareWithASCIIString(name, "__debug__")) {
- return compiler_error(c, "can not assign to __debug__");
- }
-
mangled = _Py_Mangle(c->u->u_private, name);
if (!mangled)
return 0;
More information about the Python-3000-checkins
mailing list