Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ _get_duration
Method
_get_duration
example_code/item_109.py:57–58 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
55
self.hot = False
56
57
def
_get_duration(self):
58
return
max(0.1, min(120, self.doneness * 10))
59
60
def
push_down(self):
61
if
self.hot:
Callers
3
push_down
Method · 0.95
test_min
Method · 0.80
test_max
Method · 0.80
Calls
no outgoing calls
Tested by
2
test_min
Method · 0.64
test_max
Method · 0.64