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

Method __init__

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

Source from the content-addressed store, hash-verified

111print("Example 7")
112class NewBucket:
113 def __init__(self, period):
114 self.period_delta = timedelta(seconds=period)
115 self.reset_time = datetime.now()
116 self.max_quota = 0
117 self.quota_consumed = 0
118
119 def __repr__(self):
120 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected