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

Method add_history

Lib/_pyrepl/readline.py:507–508  ·  view source on GitHub ↗
(self, line: str)

Source from the content-addressed store, hash-verified

505 # like readline.c
506
507 def add_history(self, line: str) -> None:
508 self.get_reader().history.append(self._histline(line))
509
510 def set_startup_hook(self, function: Callback | None = None) -> None:
511 self.startup_hook = function

Callers 6

testHistoryUpdatesMethod · 0.80
test_nonascii_historyMethod · 0.80
test_nonasciiMethod · 0.80

Calls 3

get_readerMethod · 0.95
_histlineMethod · 0.95
appendMethod · 0.45

Tested by 6

testHistoryUpdatesMethod · 0.64
test_nonascii_historyMethod · 0.64
test_nonasciiMethod · 0.64