xstate-python
xstate-python copied to clipboard
Consider using enums
https://docs.python.org/3/library/enum.html
For the state and transition types?
import enum
class StateType(enum.Enum):
compound = "compound"
history = "history"
atomic = "atomic"
final = "final"
class TransitionType(enum.Enum):
internal = 0
external = 1
For the state and transition types?
Yes (sorry, should have been more clear!)