exec_either

pypagate.source.exec_either(form, f, g, source)

Either executes f if form evaluates to True or g if form evaluates to False whenever source.listen(...) is called.

Parameters:
  • form – The Formula to test against.

  • f – The function to execute if form is True.

  • g – The function to execute if form is False.

  • source – Either f or g is executed whenever source.listen(…) is called.