]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46196: document method cmd.Cmd.columnize (#30303)
authorNikita Sobolev <mail@sobolevn.me>
Sun, 2 Jan 2022 18:33:20 +0000 (21:33 +0300)
committerGitHub <noreply@github.com>
Sun, 2 Jan 2022 18:33:20 +0000 (13:33 -0500)
The method is already written and tested, now it's officially public.

Doc/library/cmd.rst
Misc/NEWS.d/next/Documentation/2021-12-30-19-12-24.bpo-46196.UvQ8Sq.rst [new file with mode: 0644]

index d57edb7eb1698d203592b6d5ac68d16a78161d4e..fd5df96dfd0b3d692ddcadc3262fc79783425f54 100644 (file)
@@ -121,6 +121,13 @@ A :class:`Cmd` instance has the following methods:
    :meth:`complete_\*` method is available.  By default, it returns an empty list.
 
 
+.. method:: Cmd.columnize(list, displaywidth=80)
+
+   Method called to display a list of strings as a compact set of columns.
+   Each column is only as wide as necessary.
+   Columns are separated by two spaces for readability.
+
+
 .. method:: Cmd.precmd(line)
 
    Hook method executed just before the command line *line* is interpreted, but
diff --git a/Misc/NEWS.d/next/Documentation/2021-12-30-19-12-24.bpo-46196.UvQ8Sq.rst b/Misc/NEWS.d/next/Documentation/2021-12-30-19-12-24.bpo-46196.UvQ8Sq.rst
new file mode 100644 (file)
index 0000000..f14ada6
--- /dev/null
@@ -0,0 +1 @@
+Document method :meth:`cmd.Cmd.columnize`.