Skip to content

Instantly share code, notes, and snippets.

@glyph
Created September 16, 2015 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glyph/40d9e20796b15b07d0d5 to your computer and use it in GitHub Desktop.
Save glyph/40d9e20796b15b07d0d5 to your computer and use it in GitHub Desktop.
class Mechanism(object):
m = MethodicalMachine()
def __init__(self):
self.value = 1
@m.state(serialized="first-state")
def first(self):
"First state."
@m.state(serialized="second-state")
def second(self):
"Second state."
_state = m.state.descriptor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment