(self, name, func)
Remove a callback from a hook.
Remove a callback from a hook.
Remove a callback from a hook .
def remove(self, name, func):
        ''' Remove a callback from a hook. '''
        was_empty = self._empty()
        if name in self.hooks and func in self.hooks[name]:
            self.hooks[name].remove(func)
        if self.app and not was_empty and self._empty(): self.app.reset()
def remove ( self , name , func ) : was_empty = self . _empty ( ) if name in self . hooks and func in self . hooks [ name ] : self . hooks [ name ] . remove ( func ) if self . app and not was_empty and self . _empty ( ) : self . app . reset ( )