summaryrefslogtreecommitdiffstats
path: root/Doc/library/idle.rst
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2020-09-22 17:21:58 (GMT)
committerGitHub <noreply@github.com>2020-09-22 17:21:58 (GMT)
commit947adcaa13080790167757664912c3a6c2d4c201 (patch)
treeaf5948fa6aeb6ac9e5e42e76afc646f674d3f117 /Doc/library/idle.rst
parent0d0e9fe2ffc1683758a1985ef6dedeef5ecafdbc (diff)
downloadcpython-947adcaa13080790167757664912c3a6c2d4c201.zip
cpython-947adcaa13080790167757664912c3a6c2d4c201.tar.gz
cpython-947adcaa13080790167757664912c3a6c2d4c201.tar.bz2
bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)
Diffstat (limited to 'Doc/library/idle.rst')
-rw-r--r--Doc/library/idle.rst47
1 files changed, 25 insertions, 22 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 43096b0..a59a5d3 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -527,30 +527,33 @@ by typing '_' after '.', either before or after the box is opened.
Calltips
^^^^^^^^
-A calltip is shown when one types :kbd:`(` after the name of an *accessible*
-function. A name expression may include dots and subscripts. A calltip
-remains until it is clicked, the cursor is moved out of the argument area,
-or :kbd:`)` is typed. When the cursor is in the argument part of a definition,
-the menu or shortcut display a calltip.
-
-A calltip consists of the function signature and the first line of the
-docstring. For builtins without an accessible signature, the calltip
-consists of all lines up the fifth line or the first blank line. These
-details may change.
-
-The set of *accessible* functions depends on what modules have been imported
-into the user process, including those imported by Idle itself,
-and what definitions have been run, all since the last restart.
+A calltip is shown automatically when one types :kbd:`(` after the name
+of an *accessible* function. A function name expression may include
+dots and subscripts. A calltip remains until it is clicked, the cursor
+is moved out of the argument area, or :kbd:`)` is typed. Whenever the
+cursor is in the argument part of a definition, select Edit and "Show
+Call Tip" on the menu or enter its shortcut to display a calltip.
+
+The calltip consists of the function's signature and docstring up to
+the latter's first blank line or the fifth non-blank line. (Some builtin
+functions lack an accessible signature.) A '/' or '*' in the signature
+indicates that the preceding or following arguments are passed by
+position or name (keyword) only. Details are subject to change.
+
+In Shell, the accessible functions depends on what modules have been
+imported into the user process, including those imported by Idle itself,
+and which definitions have been run, all since the last restart.
For example, restart the Shell and enter ``itertools.count(``. A calltip
-appears because Idle imports itertools into the user process for its own use.
-(This could change.) Enter ``turtle.write(`` and nothing appears. Idle does
-not import turtle. The menu or shortcut do nothing either. Enter
-``import turtle`` and then ``turtle.write(`` will work.
-
-In an editor, import statements have no effect until one runs the file. One
-might want to run a file after writing the import statements at the top,
-or immediately run an existing file before editing.
+appears because Idle imports itertools into the user process for its own
+use. (This could change.) Enter ``turtle.write(`` and nothing appears.
+Idle does not itself import turtle. The menu entry and shortcut also do
+nothing. Enter ``import turtle``. Thereafter, ``turtle.write(``
+will display a calltip.
+
+In an editor, import statements have no effect until one runs the file.
+One might want to run a file after writing import statements, after
+adding function definitions, or after opening an existing file.
.. _code-context: