[pypy-commit] pypy py3.5: detail changed in AST between 3.3 and 3.5

arigo pypy.commits at gmail.com
Thu Dec 1 16:37:44 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r88806:22496395faa8
Date: 2016-12-01 18:26 +0100
http://bitbucket.org/pypy/pypy/changeset/22496395faa8/

Log:	detail changed in AST between 3.3 and 3.5

diff --git a/pypy/interpreter/astcompiler/symtable.py b/pypy/interpreter/astcompiler/symtable.py
--- a/pypy/interpreter/astcompiler/symtable.py
+++ b/pypy/interpreter/astcompiler/symtable.py
@@ -484,9 +484,6 @@
 
     def visit_Global(self, glob):
         for name in glob.names:
-            if isinstance(self.scope, ClassScope) and name == '__class__':
-                raise SyntaxError("cannot make __class__ global",
-                                  glob.lineno, glob.col_offset)
             old_role = self.scope.lookup_role(name)
             if old_role & (SYM_USED | SYM_ASSIGNED):
                 if old_role & SYM_ASSIGNED:


More information about the pypy-commit mailing list