[pypy-commit] pypy pep526: Make symtable handle non-Name targets properly in variable annotation.

alcarithemad pypy.commits at gmail.com
Thu Mar 1 05:08:02 EST 2018


Author: Colin Valliant <alcarithemad at gmail.com>
Branch: pep526
Changeset: r93920:509be3f27434
Date: 2018-02-14 22:08 -0800
http://bitbucket.org/pypy/pypy/changeset/509be3f27434/

Log:	Make symtable handle non-Name targets properly in variable
	annotation.

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
@@ -433,6 +433,8 @@
             if assign.value:
                 scope |= SYM_USED
             self.note_symbol(name, scope)
+        else:
+            target.walkabout(self)
 
     def visit_ClassDef(self, clsdef):
         self.note_symbol(clsdef.name, SYM_ASSIGNED)


More information about the pypy-commit mailing list