class ClassDeco: def __init__(self, f): self.f = f def __call__(self, *args, **kwargs): print(self.f, args, kwargs) return self.f(*args, **kwargs) @ClassDeco def foo(): return 45 # foo = ClassDeco(foo)