File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -940,9 +940,7 @@ func (c *compiler) Stmt(stmt ast.Stmt) {
940940 c .Op (vm .RETURN_VALUE )
941941 case * ast.Delete :
942942 // Targets []Expr
943- for _ , target := range node .Targets {
944- c .Expr (target )
945- }
943+ c .Exprs (node .Targets )
946944 case * ast.Assign :
947945 // Targets []Expr
948946 // Value Expr
@@ -1492,9 +1490,7 @@ func (c *compiler) Expr(expr ast.Expr) {
14921490 }
14931491 case * ast.Set :
14941492 // Elts []Expr
1495- for _ , elt := range node .Elts {
1496- c .Expr (elt )
1497- }
1493+ c .Exprs (node .Elts )
14981494 c .OpArg (vm .BUILD_SET , uint32 (len (node .Elts )))
14991495 case * ast.ListComp :
15001496 // Elt Expr
@@ -1637,17 +1633,13 @@ func (c *compiler) Expr(expr ast.Expr) {
16371633 // Elts []Expr
16381634 // Ctx ExprContext
16391635 // FIXME do something with Ctx
1640- for _ , elt := range node .Elts {
1641- c .Expr (elt )
1642- }
1636+ c .Exprs (node .Elts )
16431637 c .OpArg (vm .BUILD_LIST , uint32 (len (node .Elts )))
16441638 case * ast.Tuple :
16451639 // Elts []Expr
16461640 // Ctx ExprContext
16471641 // FIXME do something with Ctx
1648- for _ , elt := range node .Elts {
1649- c .Expr (elt )
1650- }
1642+ c .Exprs (node .Elts )
16511643 c .OpArg (vm .BUILD_TUPLE , uint32 (len (node .Elts )))
16521644 default :
16531645 panic (py .ExceptionNewf (py .SyntaxError , "Unknown ExprBase: %v" , expr ))
You can’t perform that action at this time.
0 commit comments