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

Method remove_history_item

Lib/_pyrepl/readline.py:491–497  ·  view source on GitHub ↗
(self, index: int)

Source from the content-addressed store, hash-verified

489 return None # like readline.c
490
491 def remove_history_item(self, index: int) -> None:
492 history = self.get_reader().history
493 if 0 <= index < len(history):
494 del history[index]
495 else:
496 raise ValueError("No history item at position %d" % index)
497 # like readline.c
498
499 def replace_history_item(self, index: int, line: str) -> None:
500 history = self.get_reader().history

Callers 1

testHistoryUpdatesMethod · 0.80

Calls 1

get_readerMethod · 0.95

Tested by 1

testHistoryUpdatesMethod · 0.64