golemfactory / golem-core-python

GNU General Public License v3.0
3 stars 2 forks source link

rename `EventBus.off` #140

Open shadeofblue opened 6 months ago

shadeofblue commented 6 months ago

I'm finding the name of the EventBus.off very confusing...

I understand that this is thought to be a counterpart to on ... as in on/off ... as an analogy to switch in a mechanism... but this is not such a mechanism... in the context of the event bus, on means: let's schedule _this_ to happen _on_ the occasion of a particular event ... and in this context, off does not mean, disable this event handler but rather remove this event handler ... so the name of the method should reflect that... so, imvho, that should be something like remove or remove_handler or clear or clear_handler ... or something similar...

approxit commented 6 months ago

For a little more context: When I redesigned EventBus, I followed the name pattern from... jquery.