(self, index: int, line: str)
| 497 | # like readline.c |
| 498 | |
| 499 | def replace_history_item(self, index: int, line: str) -> None: |
| 500 | history = self.get_reader().history |
| 501 | if 0 <= index < len(history): |
| 502 | history[index] = self._histline(line) |
| 503 | else: |
| 504 | raise ValueError("No history item at position %d" % index) |
| 505 | # like readline.c |
| 506 | |
| 507 | def add_history(self, line: str) -> None: |
| 508 | self.get_reader().history.append(self._histline(line)) |