https://github.com/python/cpython/commit/05d366da97b905e0da0dc4d1a863d6408b84dd75
commit: 05d366da97b905e0da0dc4d1a863d6408b84dd75
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-23T16:59:17+01:00
summary:

[3.14] gh-58083: Expand the introduction of the `cmd` module (GH-155738) 
(#160439)

(cherry picked from commit fd8f475c7eff783495de765b7981dd803094c589)

Co-authored-by: Michele Angrisano <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/library/cmd.rst

diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index 1757dedabbf633..8636fecb8323a4 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -15,6 +15,13 @@ command interpreters.  These are often useful for test 
harnesses, administrative
 tools, and prototypes that will later be wrapped in a more sophisticated
 interface.
 
+A command interpreter built with :class:`Cmd` typically presents the user
+with an interactive prompt, reads input one line at a time, and dispatches each
+command to a method named ``do_`` followed by the command name.  For example,
+the ``help`` command is handled by the :meth:`~Cmd.do_help` method.  Apart from
+the built-in ``help`` command, most of the interpreter's behavior is defined by
+the ``do_*`` methods you add in your own subclass.
+
 .. class:: Cmd(completekey='tab', stdin=None, stdout=None)
 
    A :class:`Cmd` instance or subclass instance is a line-oriented interpreter

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to