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

Method clear_history

Lib/_pyrepl/readline.py:481–482  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

479 self.set_history_length(saved_length + length)
480
481 def clear_history(self) -> None:
482 del self.get_reader().history[:]
483
484 def get_history_item(self, index: int) -> str | None:
485 history = self.get_reader().history

Callers 4

testHistoryUpdatesMethod · 0.80
test_nonascii_historyMethod · 0.80

Calls 1

get_readerMethod · 0.95

Tested by 4

testHistoryUpdatesMethod · 0.64
test_nonascii_historyMethod · 0.64