'Registers a handler. The handler can be transmitted together
with two arguments as a list or dictionary. The arguments are:
memoize
if True, the execution result will be cached in self.memoize
timeout
will allocate a predefined time interval for the execution
If arguments are provided as a list, they are considered to have
this sequence: (handler, memoize, timeout)
Examples:
event += handler
event += (handler, True, 1.5)
event += {\'handler\':handler, \'memoize\':True, \'timeout\':1.5}'

def handle(self, handler, priority=0):

    (handler_, memoize, timeout) = self._extract(handler)
    self.handlers[('%s.%s' % (priority, self.hash(handler_)))] = (handler_, memoize, timeout)
    return self
