Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ tick
Method
tick
example_code/item_047.py:157–160 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
155
self.current = self.period
156
157
def
tick(self):
158
before = self.current
159
self.current -= 1
160
return
before
161
162
def
__bool__(self):
163
return
self.current > 0
Callers
1
run
Function · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected