titus.genpy.doForkeyval

titus.genpy.doForkeyval(state, scope, forkey, forval, mapping, loopBody)[source]

Helper function for constructing for key,value loops as an expression.

Calls state.checkTime() on every iteration.

Parameters:
  • state (titus.genpy.ExecutionState) – exeuction state
  • scope (titus.util.DynamicScope) – dynamic scope object
  • forkey (string) – new variable for each item key
  • forval (string) – new variable for each item value
  • name (Python dict) – map of key-value pairs to loop over
  • loopBody (callable) – function that is called while predicate returns True
Return type:

None

Returns:

nothing