I've implemented these for PluginBase locally, thought it might be nice to contribute to the repo too.
I find it practical to be able to have multiple methods called when a single event fires within the same plugin, e.g. adding a debug callback to an event that already has a callback method. Not currently possible within a single PluginBase instance as the events dict maps string -> string.
I also find it simpler to be able to use a decorator to subscribe methods to events, rather than having to edit the events attribute each time I want to make a change. More useful if the Plugin file is very long. Also makes it a bit easier to understand what a method does at a glance.
I've implemented these for PluginBase locally, thought it might be nice to contribute to the repo too.
I find it practical to be able to have multiple methods called when a single event fires within the same plugin, e.g. adding a debug callback to an event that already has a callback method. Not currently possible within a single PluginBase instance as the
events
dict maps string -> string.I also find it simpler to be able to use a decorator to subscribe methods to events, rather than having to edit the
events
attribute each time I want to make a change. More useful if the Plugin file is very long. Also makes it a bit easier to understand what a method does at a glance.