MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _py_while_stmt

Function _py_while_stmt

tensorflow/python/autograph/operators/control_flow.py:837–855  ·  view source on GitHub ↗

Overload of while_stmt that executes a Python while loop.

(test, body, get_state, set_state, init_vars, opts)

Source from the content-addressed store, hash-verified

835
836
837def _py_while_stmt(test, body, get_state, set_state, init_vars, opts):
838 """Overload of while_stmt that executes a Python while loop."""
839 del opts, get_state, set_state
840
841 if __debug__:
842 checker = _PythonLoopChecker()
843
844 loop_vars = init_vars
845 while test(*loop_vars):
846
847 if __debug__:
848 checker.before_iteration()
849
850 loop_vars = body(*loop_vars)
851
852 if __debug__:
853 checker.after_iteration()
854
855 return loop_vars
856
857
858def if_stmt(cond,

Callers 1

while_stmtFunction · 0.85

Calls 5

_PythonLoopCheckerClass · 0.85
before_iterationMethod · 0.80
after_iterationMethod · 0.80
testFunction · 0.50
bodyFunction · 0.50

Tested by

no test coverage detected