-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metaclass API for defining events #63
Comments
We could also just force it on the user to add a |
dataclasses could be a nice way to do this but I'm not inclined to force it. |
It would be totally up to the consumer to decide to use them or not. Here's a PR to show case that for Trinity ethereum/trinity#726 I only converted a few places there but I happily convert all of them if you are 👍 on that change. |
What is wrong
Defining new events requires un-necessary boilerplate. Events are typically purely for data transfer and rarely have extra methods or properties.
How can it be fixed?
It'd be really nice to be able to do this:
Doing this with metaclasses is quite easy and it would reduce the boilerplate in defining new events significantly.
The text was updated successfully, but these errors were encountered: