https://github.com/python/cpython/commit/fd8f475c7eff783495de765b7981dd803094c589
commit: fd8f475c7eff783495de765b7981dd803094c589
branch: main
author: Michele Angrisano <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-23T15:51:10Z
summary:

gh-58083: Expand the introduction of the `cmd` module (#155738)

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 c988fcebd68a01..e2ad5f9fd5a091 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -13,6 +13,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