]> granicus.if.org Git - python/commitdiff
Fix SF bug #479186: compiler generates bad code for "del"
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 9 Nov 2001 16:24:34 +0000 (16:24 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 9 Nov 2001 16:24:34 +0000 (16:24 +0000)
Fix by Neil Schemenauer.  Visit the Subscript node when trying to find
the operation for a statement.

XXX Not sure if there are other nodes that should be visited.

Lib/compiler/pycodegen.py

index 88767a48470407ced124e3f14684ab5e568b7e16..83e64336d930a06b1399b4a22a5ee850dccddaea 100644 (file)
@@ -1333,6 +1333,7 @@ class OpFinder:
         elif self.op != node.flags:
             raise ValueError, "mixed ops in stmt"
     visitAssAttr = visitAssName
+    visitSubscript = visitAssName
 
 class Delegator:
     """Base class to support delegation for augmented assignment nodes