Flashes Home Search Notifications Sign in Post
Monty @ The Python Coding Place @thepythoncodingplace.com · Mar 22

But we want `limit_uses(3)` to give us not just any callable, but a decorator callable. Recall that a decorator accepts a single argument, which is a function

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · 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

Legal

Privacy Policy Terms and Conditions

Contact

Support FAQs

Follow

Bluesky Instagram Threads
Flashes for Bluesky Get it on the App Store