Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

> My history file is only 500 lines.

*slaps forehead*

Of course it is, I'm running a customer history hook that has a limit of 500 
lines in the history file.

It looks to me that by default the history feature is set to unlimited lines, 
so I guess that implies that this isn't a bug and it is your responsibility to 
set a maximum history length.

You can put these two lines in your Python startup file:

    import readline
    readline.set_history_length(1000)  # or any number you like



Personally, I don't think that having a default setting that allows the history 
file to grow to 130MB is a good idea.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41563>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to