Source

pypy / pypy / interpreter / astcompiler / asthelpers.py

Diff from to

pypy/interpreter/astcompiler/asthelpers.py

         return self.elts
 
     def set_context(self, ctx):
-        for elt in self.elts:
-            elt.set_context(ctx)
-        self.ctx = ctx
+        if self.elts:
+            for elt in self.elts:
+                elt.set_context(ctx)
+            self.ctx = ctx
 
 
 class __extend__(ast.Attribute):