MCPcopy Index your code
hub / github.com/python/cpython / show

Method show

Lib/_pyrepl/_threading_handler.py:38–51  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 messages: list[str] = field(default_factory=list)
37
38 def show(self) -> int:
39 count = 0
40 with self.lock:
41 if not self.messages:
42 return 0
43 reader.restore()
44 for tb in self.messages:
45 count += 1
46 if tb:
47 print(tb)
48 self.messages.clear()
49 reader.scheduled_commands.append("ctrl-c")
50 reader.prepare()
51 return count
52
53 def add(self, s: str) -> None:
54 with self.lock:

Callers 1

__call__Method · 0.95

Calls 4

restoreMethod · 0.45
clearMethod · 0.45
appendMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected