Monty @ The Python Coding Place @thepythoncodingplace.com · Mar 22

Here's the same code you used on Day 5 to decorate and test a function–the second part of the code shown. This is identical code to the one in Day 5, but this time you're using the class `limit_uses`

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 22

This works since `limit_uses(3)` still returns a callable that's a decorator. And that decorator, like all decorators, returns the decorated function. Which version do you prefer, the function-based version from Day 5 or the class-based version shown here, on Day 6?