Hi!
The following code currently work:
def my_condition(self) -> bool:
return self.some_value
state_a.to(state_b, cond="my_condition")
state_c.to(state_c, cond=my_condition)
But passing a lambda directly does not:
state_a.to(state_b, cond=lambda self: self.some_value)
The v2.6 documentation suggests lambdas were accepted at one point. Was this lambda
support change intentional? It would be convenient to define simple guard conditions
inline without needing a named method.
Hi!
The following code currently work:
But passing a lambda directly does not:
The v2.6 documentation suggests lambdas were accepted at one point. Was this lambda
support change intentional? It would be convenient to define simple guard conditions
inline without needing a named method.