Just wrap the the first decorator into a wrapper function and return it.
Actually this happens with the first decorator too. If you have any docstrings in the decorated function you will lose it. See functools.wraps
def superdecorator(decorator): def wrapper(*args, **kwargs): def decorator(func): def wrapped(*args, **kwargs): print('{} * {} = '.format(*args*n,**kwargs*n), end='') return func(*args*n, **kwargs*n) return wrapped return decorator return wrapperBut you will have a problem with the function names.
Actually this happens with the first decorator too. If you have any docstrings in the decorated function you will lose it. See functools.wraps