From: Jeremy Hylton Date: Fri, 9 Nov 2001 16:24:34 +0000 (+0000) Subject: Fix SF bug #479186: compiler generates bad code for "del" X-Git-Tag: v2.2.1c1~819 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6383c2d1a677f168ed2a4dfc9cb28f93ec327a0e;p=python Fix SF bug #479186: compiler generates bad code for "del" 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. --- diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 88767a4847..83e64336d9 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -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