MCPcopy Index your code
hub / github.com/RustPython/RustPython / remove_history_item

Method remove_history_item

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

Source from the content-addressed store, hash-verified

468 return None # like readline.c
469
470 def remove_history_item(self, index: int) -> None:
471 history = self.get_reader().history
472 if 0 <= index < len(history):
473 del history[index]
474 else:
475 raise ValueError("No history item at position %d" % index)
476 # like readline.c
477
478 def replace_history_item(self, index: int, line: str) -> None:
479 history = self.get_reader().history

Callers

nothing calls this directly

Calls 2

get_readerMethod · 0.95
lenFunction · 0.85

Tested by

no test coverage detected