MCPcopy Index your code
hub / github.com/python/mypy / handle_loop

Function handle_loop

mypyc/irbuild/for_helpers.py:414–429  ·  view source on GitHub ↗

Generate IR for a loop. Given a list of (index, expression, [conditions]) tuples, generate IR for the nested loops the list defines.

(loop_params: list[tuple[Lvalue, Expression, list[Expression], bool]])

Source from the content-addressed store, hash-verified

412 """
413
414 def handle_loop(loop_params: list[tuple[Lvalue, Expression, list[Expression], bool]]) -> None:
415 """Generate IR for a loop.
416
417 Given a list of (index, expression, [conditions]) tuples, generate IR
418 for the nested loops the list defines.
419 """
420 index, expr, conds, is_async = loop_params[0]
421 for_loop_helper(
422 builder,
423 index,
424 expr,
425 lambda: loop_contents(conds, loop_params[1:]),
426 None,
427 is_async=is_async,
428 line=line,
429 )
430
431 def loop_contents(
432 conds: list[Expression],

Callers 2

loop_contentsFunction · 0.85
comprehension_helperFunction · 0.85

Calls 2

for_loop_helperFunction · 0.85
loop_contentsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…