Message 92893 - Python tracker (original) (raw)
The documentation for the readline module is a bit too minimal.
function 'add_history' is described at the end of the documentation, not near the other functions for manipulation the history stack.
the index for remove_history_item and replace_history_item is 0- based, while the index for get_history_item is 1-based.
The latter is a confusing API in the underlying readline library and should IMO be described in Python's documentation.
(If readline were a new addition to the stdlib I'd prefer to fix the interface, but that would have too many backward compatibility issues at this point in time).