Provides a decorator to decorate decorators so that they can be used both with and without args



Allow to use decorator either with arguments or not. Example:

def apply(func, *args, **kw):
    return func(*args, **kw)

class apply:
    def __init__(self, *args, **kw):
        self.args = args
        self.kw   = kw

    def __call__(self, func):
        return func(*self.args, **self.kw)

# Usage in both cases:
def test():
    return 'test'

assert test == 'test'

@apply(2, 3)
def test(a, b):
    return a + b

assert test == 5