Author: Amaury Forgeot d'Arc <amaur...@gmail.com> Branch: py3.5 Changeset: r91070:61b843dccbd8 Date: 2017-04-17 18:21 +0200 http://bitbucket.org/pypy/pypy/changeset/61b843dccbd8/
Log: 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 @@ -135,7 +135,7 @@ err = "no binding for nonlocal '%s' found" % (name,) raise SyntaxError(err, self.lineno, self.col_offset) self.symbols[name] = SCOPE_FREE - self.free_vars[name] = None + self.free_vars.append(name) free[name] = None self.has_free = True elif flags & SYM_BOUND: @@ -147,7 +147,7 @@ pass elif bound and name in bound: self.symbols[name] = SCOPE_FREE - self.free_vars[name] = None + self.free_vars.append(name) free[name] = None self.has_free = True elif name in globs: @@ -204,7 +204,7 @@ except KeyError: if bound and name in bound: self.symbols[name] = SCOPE_FREE - self.free_vars[name] = None + self.free_vars.append(name) else: if role_here & (SYM_BOUND | SYM_GLOBAL) and \ self._hide_bound_from_nested_scopes: @@ -213,7 +213,7 @@ # scope. We add the name to the class scope's list of free # vars, so it will be passed through by the interpreter, but # we leave the scope alone, so it can be local on its own. - self.free_vars[name] = None + self.free_vars.append(name) self._check_optimization() free.update(new_free) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit