[Python-checkins] CVS: python/dist/src/Tools/compiler/compiler symbols.py,1.8,1.9
Jeremy Hylton
jhylton@users.sourceforge.net
Fri, 14 Sep 2001 15:45:59 -0700
Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv23334
Modified Files:
symbols.py
Log Message:
The object-being sliced in an assignment to a slice is referenced, not
bound.
When a Yield() node is visited, assign to the generator attribute of
the scope, not the visitor.
Index: symbols.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/symbols.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** symbols.py 2001/08/29 18:10:51 1.8
--- symbols.py 2001/09/14 22:45:57 1.9
***************
*** 322,326 ****
def visitSlice(self, node, scope, assign=0):
! self.visit(node.expr, scope, assign)
if node.lower:
self.visit(node.lower, scope, 0)
--- 322,326 ----
def visitSlice(self, node, scope, assign=0):
! self.visit(node.expr, scope, 0)
if node.lower:
self.visit(node.lower, scope, 0)
***************
*** 354,358 ****
def visitYield(self, node, scope):
! self.generator = 1
self.visit(node.value, scope)
--- 354,358 ----
def visitYield(self, node, scope):
! scope.generator = 1
self.visit(node.value, scope)