Open sirhc78 opened 6 years ago
You can probably do it in the class constructor. I don't know how or if it's possible to do it on the class function. This is the only place you're defining these values anyway.
from ratelimit import limits
class test:
def __init__ (self, maxcalls, period):
self.todo = limits(calls=maxcalls, period=period)(self._todo)
def _todo(self):
pass
Hi,
I am trying to use Ratelimit in a class.
But I can't. What can be my solutions ?
Thanks