Using decorators instead of binding function names #306
Closed
danielkanzel
started this conversation in
Ideas
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 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions