MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_frame

Method get_frame

Lib/test/test_generators.py:746–758  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

744 self.frame = None
745
746 def get_frame(index):
747 if index == 1:
748 return next(g1())
749 elif index == 2:
750 gen = g2()
751 next(gen)
752 return gen.gi_frame
753 elif index == 3:
754 obj = ObjectWithFrame()
755 next(g3(obj))
756 return obj.frame
757 else:
758 return None
759
760 for index in (1, 2, 3):
761 with self.subTest(index=index):

Callers

nothing calls this directly

Calls 5

nextFunction · 0.85
g1Function · 0.85
g2Function · 0.85
ObjectWithFrameClass · 0.85
g3Function · 0.85

Tested by

no test coverage detected