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

Method push_down

example_code/item_109.py:60–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 return max(0.1, min(120, self.doneness * 10))
59
60 def push_down(self):
61 if self.hot:
62 return
63
64 self.hot = True
65 self.timer.countdown(self._get_duration(), self.pop_up)
66
67 def pop_up(self):
68 print("Pop!") # Release the spring

Callers 4

test_startMethod · 0.95
item_109.pyFile · 0.80
test_wait_finishMethod · 0.80
test_cancel_earlyMethod · 0.80

Calls 2

_get_durationMethod · 0.95
countdownMethod · 0.80

Tested by 3

test_startMethod · 0.76
test_wait_finishMethod · 0.64
test_cancel_earlyMethod · 0.64