Using decorators instead of binding function names #306
Replies: 1 comment 1 reply
-
Hi @danielkanzel , nice suggestion! Currently, only decorators for events are supported. But on I think that using the @statemachine.my_state.before
def my_function(self):
... I've implemented it in a way that even unbounded functions should work: @statemachine.my_state.before
def my_function():
... I'm working on this at #307, let me know what do you think. Here you can find the preview for the docs on this PR: https://python-statemachine--307.org.readthedocs.build/en/307/actions.html |
Beta Was this translation helpful? Give feedback.
-
Hi, fellow @fgmacedo !
I think what this:
looks more pythonic when this:
And what do you think?
Are decorators planned or maybe you need my participation for them?
Beta Was this translation helpful? Give feedback.
All reactions