From 5d9c214d4a517ffd8ff52bfd3baf80596aa8c836 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Mon, 24 May 2021 10:17:50 +0200 Subject: history: add docstring to get_entry --- saneterm/history.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/saneterm/history.py b/saneterm/history.py index 2b99af8..d79b3dc 100644 --- a/saneterm/history.py +++ b/saneterm/history.py @@ -54,6 +54,11 @@ class History(): self.__con.commit() def get_entry(self, fd, offset): + '''Select an entry by the given offset. The offset is + interpreted relative to the latest entry. That is, + an offset of zero would return the current entry and + an offset of one would return the previous entry. None + is returned if no entry with the given offset exists.''' exe = self.__get_exec(fd) # Select an entry by the given offset. If the offset exceeds the -- cgit 1.4.1