This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: The cmd module incorrectly lists "help" as an undocumented command
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, python-dev, rhettinger, roger.serwy
Priority: normal Keywords: easy

Created on 2012-07-12 19:48 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg165332 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012-07-12 19:48
The following minimal script:
-----------------------------
import cmd
class C(cmd.Cmd): pass
C().cmdloop()

Creates the following help display:
-----------------------------------
(Cmd) help

Undocumented commands:
======================
help

For people who are consistently documenting their other commands, it is annoying to have anything at all listed in the "undocumented section".  So, help should have it's own default help message.
msg165459 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-07-14 17:38
On 3.3.0b1 and 3.2 I get:


(Cmd) help

Documented commands (type help <topic>):
========================================
help


I only see help under "Undocumented" with 2.7.


It looks like this changeset f8c896ad787f never got backported to 2.7. This involves adding a doc string to do_help. Manually applying this doc_string fixes the problem on 2.7
msg165577 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-16 07:11
New changeset 076ae30e5dd0 by Raymond Hettinger in branch '2.7':
Issue 15337: help() shown as undocumented
http://hg.python.org/cpython/rev/076ae30e5dd0
History
Date User Action Args
2022-04-11 14:57:32adminsetgithub: 59542
2012-07-16 07:11:37rhettingersetstatus: open -> closed
resolution: fixed
2012-07-16 07:11:12python-devsetnosy: + python-dev
messages: + msg165577
2012-07-16 06:42:36rhettingersetversions: - Python 3.2, Python 3.3
2012-07-14 17:38:45roger.serwysetnosy: + roger.serwy
messages: + msg165459
2012-07-14 12:56:11eric.araujosetnosy: + eric.araujo

title: The cmd module incorrectly lists "help" as an undocument command -> The cmd module incorrectly lists "help" as an undocumented command
2012-07-12 19:48:10rhettingercreate