'Decorator to register an implementation for a specific set of types.
.register(t1, t2)(f) is equivalent to .register_func((t1, t2), f).'

def register(self, *types):

    def helper(func):
        self.register_func(types, func)
        return func
    return helper
