-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Description
Problem
Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect.
Proposed solution
Allow for the following:
reg = CallbackRegistry()
def f1():
pass
cid = reg.connect("something", f1)
reg.disconnect_func("something", f1)
# above is equivalent to reg.disconnect(cid)anntzer, story645 and timhoffm