A common requirement is to customize a decorator with additional parameters. Rather than simply creating a composite , we can do something a bit more complex. With parameterized decorators, we can create . We've applied a parameter, c, as part of creating the wrapper, . This parameterized composite function, , can ...
Adding a parameter to a decorator
Get Functional Python Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.