def add(self, callback, *args, name=None, enabled=True, ignore_errors=False, fwd_kwargs=None, **kwargs):
    if (args or kwargs or fwd_kwargs):
        if fwd_kwargs:
            kwargs.update(fwd_kwargs)
        callback = partial(callback, *args, **kwargs)
    name = (name or hash(callback))
    assert (name not in self._handlers)
    handler = self.Handler(callback, enabled=enabled, ignore_errors=ignore_errors)
    self._handlers[name] = handler
    self._stack.callback(handler)
    return name
def add(self, callback, *args, name=None, enabled=True, ignore_errors=False, fwd_kwargs=None, **kwargs):
    if (args or kwargs or fwd_kwargs):
        if fwd_kwargs:
            kwargs.update(fwd_kwargs)
        callback = partial(callback, *args, **kwargs)
    name = (name or hash(callback))
    assert (name not in self._handlers)
    handler = self.Handler(callback, enabled=enabled, ignore_errors=ignore_errors)
    self._handlers[name] = handler
    self._stack.callback(handler)
    return name