MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __init__

Method __init__

example_code/item_059.py:54–57  ·  view source on GitHub ↗
(self, period)

Source from the content-addressed store, hash-verified

52
53class Bucket:
54 def __init__(self, period):
55 self.period_delta = timedelta(seconds=period)
56 self.reset_time = datetime.now()
57 self.quota = 0
58
59 def __repr__(self):
60 return f"Bucket(quota={self.quota})"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected