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

Let's do this in steps. First, change the name of the `limit_to_three_uses()` decorator to a generic name, such as `decorator()`. You'll see that this function name will no longer be exposed to the global scope in the next step, so it doesn't matter what you name it.

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 17

Next, you can enclose all of this code–the decorator with its inner function–within another function. You can call this `limit_uses()`. This is the function you'll use in your code to decorate other functions. It accepts one parameter in this case.