Commits

Philip Jenvey committed 04e9f16

reduce diff w/ default

Comments (0)

Files changed (1)

pypy/interpreter/pyframe.py

         for i in range(nfreevars):
             self.cells[i + ncellvars] = outer_func.closure[i]
 
-    def is_generator(self):
-        return self.getcode().co_flags & pycode.CO_GENERATOR
-            
     def run(self):
         """Start this frame's execution."""
-        if self.is_generator():
+        if self.getcode().co_flags & pycode.CO_GENERATOR:
             if self.getcode().co_flags & pycode.CO_YIELD_INSIDE_TRY:
                 from pypy.interpreter.generator import GeneratorIteratorWithDel
                 return self.space.wrap(GeneratorIteratorWithDel(self))