Author: Manuel Jacob <[email protected]>
Branch: py3.5
Changeset: r90446:394bf344ef56
Date: 2017-03-01 18:55 +0100
http://bitbucket.org/pypy/pypy/changeset/394bf344ef56/
Log: (stevie, mjacob) Try to fix translation.
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
@@ -512,7 +512,7 @@
msg = "name '%s' is nonlocal and global" % (name,)
if old_role & SYM_PARAM:
msg = "name '%s' is parameter and nonlocal" % (name,)
- if type(self.scope) == ModuleScope:
+ if isinstance(self.scope, ModuleScope):
msg = "nonlocal declaration not allowed at module level"
if msg is not "":
raise SyntaxError(msg, nonl.lineno, nonl.col_offset)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit