
The idea of `decorator_factory` is to eliminate boilerplate code that used to create a decorator with parameters. A perfect example is how `dataclass` decorator can be simplified from this: ``` def dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False): def wrap(cls): return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) # See if we're being called as @dataclass or @dataclass(). if cls is None: # We're called with parens. return wrap # We're called as @dataclass without parens. return wrap(cls) ``` To this: @functools.decorator_factory def dataclass(cls, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False): return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) ```