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

So `.__call__(func)` is the decorator. It makes the instance of `limit_uses` a decorator. It accepts a function and it should return a function–the decorated version

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 22

See the similarity? The `.__call__()` special method is equivalent to the `decorator()` inner function in the function-based version (Day 5) This decorator still has access to `limit` since `.limit` is a data attribute.