Allow the behavior of a decorator to be modified by other decorators.
@mod_b
@mod_a
@base_decorator
def myfunc(): pass
In contrast to a more typical
@arg_decorator(opt_a, opt_b)
def myfunc(): pass
The motivation was a situation where a decorator was used extensively for access control checks. A new situation arose where the access control criteria needed to change for some decorated methods.
Typically this would be a case for using a decorator generator with arguments passed to configure as needed. This would have required updating every instance of the decorator to make it into a function call on the generator.
This decorator class approach allowed the existing decorators to remain unchanged and to add a configuring decorator in the handful of cases in which it was required.
Obviously there is a complexity and clarity trade-off. Perhaps time will reveal whether it is a reasonable trade.