Skip to content

Commit 587740b

Browse files
committed
change help(help) output
1 parent 5800535 commit 587740b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Lib/pydoc.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,15 +2222,18 @@ def helphelp(self):
22222222
22232223
* Calling help() with no arguments starts an interactive help session.
22242224
2225-
* Calling help(x) will have one of two behaviors depending on the type
2226-
of the argument:
2225+
* The behavior of help(x) depends on x's type:
22272226
22282227
* If x is a string, help(x) provides information about the given
22292228
topic. For example, help("class") will provide information about
22302229
the "class" keyword, and help("math.sqrt") will provide
22312230
information about the "math.sqrt" function.
22322231
2233-
* If x is not a string, help(x) prints information about x's type.
2232+
* If x is a class or a built-in type, help(x) provides information
2233+
about that type. For example, help(str) will provide information
2234+
about the str type.
2235+
2236+
* For all other objects, help(x) prints information about x's type.
22342237
For example, help(20) will provide information about the int type.
22352238
"""))
22362239

0 commit comments

Comments
 (0)