cpython: 416db1a2fb81 (original) (raw)

Mercurial > cpython

changeset 99861:416db1a2fb81 3.5

#25991: fix readline example to limit history size. Patch by Daniel Dye. [#25991]

Ezio Melotti ezio.melotti@gmail.com
date Mon, 11 Jan 2016 23:30:56 +0200
parents 1e9ec2d9f2d6
children cb08e5271cc0 6bd4a4907f66
files Doc/library/readline.rst
diffstat 1 files changed, 4 insertions(+), 0 deletions(-)[+] [-] Doc/library/readline.rst 4

line wrap: on

line diff

--- a/Doc/library/readline.rst +++ b/Doc/library/readline.rst @@ -209,6 +209,8 @@ from the user's :envvar:PYTHONSTARTUP histfile = os.path.join(os.path.expanduser("~"), ".python_history") try: readline.read_history_file(histfile)

@@ -234,6 +236,7 @@ sessions, by only appending the new hist def save(prev_h_len, histfile): new_h_len = readline.get_history_length()

def save_history(self, histfile):