In the middle of the desert you can say anything you want

28 Feb 2023

Python state machine

Was doing a graph-like stucture to easily explain a really complex decision tree that’s not really a tree, but I was really looking for an existing thing: A state machine!

And it’s even an existing programming pattern: StateMachine — Python 3 Patterns, Recipes and Idioms

The book I didn’t know I needed!

Anyway, existing implementations:

I really like how feature-complete and documented transitions is - callbacks etc.

Nel mezzo del deserto posso dire tutto quello che voglio.