8000 Cleaned up the description of readline.set_completer(). · python/cpython@905dc55 · GitHub
[go: up one dir, main page]

Skip to content

Commit 905dc55

Browse files
committed
Cleaned up the description of readline.set_completer().
Thanks to Nathaniel Gray for reporting the confusion.
1 parent 722d78f commit 905dc55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Doc/lib/libreadline.tex

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ \section{\module{readline} ---
5555
\end{funcdesc}
5656

5757
\begin{funcdesc}{set_completer}{\optional{function}}
58-
Set or remove the completer function. The completer function is
59-
called as \code{\var{function}(\var{text}, \var{state})},
60-
\code{for i in [0, 1, 2, ...]} until it returns a non-string.
61-
It should return the next possible completion starting with \var{text}.
58+
Set or remove the completer function. If \var{function} is specified,
59+
it will be used as the new completer function; if omitted or
60+
\code{None}, any completer function already installed is removed. The
61+
completer function is called as \code{\var{function}(\var{text},
62+
\var{state})}, for \var{state} in \code{0}, \code{1}, \code{2}, ...,
63+
until it returns a non-string value. It should return the next
64+
possible completion starting with \var{text}.
6265
\end{funcdesc}
6366

6467
\begin{funcdesc}{get_begidx}{}

0 commit comments

Comments
 (0)
0