]> granicus.if.org Git - python/commitdiff
Add documentation for the help() built-in; contributed by Ka-Ping Yee.
authorFred Drake <fdrake@acm.org>
Tue, 18 Dec 2001 16:31:08 +0000 (16:31 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 18 Dec 2001 16:31:08 +0000 (16:31 +0000)
This is part of SF patch #494622.

Doc/lib/libfuncs.tex

index 17c17226b043908ba48f3d1959f083a323a8dcaf..c115a95d86ed8f107e369ee1dcf442085767d99f 100644 (file)
@@ -392,6 +392,16 @@ def my_import(name):
   the case for 1 and 1.0).
 \end{funcdesc}
 
+\begin{funcdesc}{help}{\optional{object}}
+  Invoke the built-in help system.  (This function is intended for
+  interactive use.)  If no argument is given, the interactive help
+  system starts on the interpreter console.  If the argument is a
+  string, then the string is looked up as the name of a module,
+  function, class, method, keyword, or documentation topic, and a
+  help page is printed on the console.  If the argument is any other
+  kind of object, a help page on the object is generated.
+\end{funcdesc}
+
 \begin{funcdesc}{hex}{x}
   Convert an integer number (of any size) to a hexadecimal string.
   The result is a valid Python expression.  Note: this always yields