MCPcopy Index your code
hub / github.com/bpython/bpython / send

Method send

bpython/test/test_curtsies.py:26–41  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

24 self._events.sort()
25
26 def send(self, timeout=None):
27 if timeout not in [None, 0]:
28 raise ValueError("timeout value %r not supported" % timeout)
29 if not self._events:
30 return None
31 if self._events[0].when <= self._current_tick:
32 return self._events.pop(0).event
33
34 if timeout == 0:
35 return None
36 elif timeout is None:
37 e = self._events.pop(0)
38 self._current_tick = e.when
39 return e.event
40 else:
41 raise ValueError("timeout value %r not supported" % timeout)
42
43 def tick(self, dt=1):
44 self._current_tick += dt

Callers 1

test_set_timeoutMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected