Decorators with arguments

Decorators with arguments#

Objectives#

In this section you will extend your understanding of decorators and you’ll see how you can create customisable decorators, which are decorators that accept arguments to modify the behaviour of the decorator itself.

Pre-requisites#

For this section, it’s assumed you are comfortable writing decorators, using *args and **kwargs, and functools.wraps.