summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-09-29 05:55:57 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-09-29 05:55:57 (GMT)
commit37f81355b0bd1b7f7b23a7efdf3267d691160669 (patch)
treeffaa968c7f0cf01ac6a6122e1157f7646307a2f1 /Doc/library
parentf38356adbbd8ccae5efe7d5a2ae486449282fd23 (diff)
downloadcpython-37f81355b0bd1b7f7b23a7efdf3267d691160669.zip
cpython-37f81355b0bd1b7f7b23a7efdf3267d691160669.tar.gz
cpython-37f81355b0bd1b7f7b23a7efdf3267d691160669.tar.bz2
Issue #24028: Add subsection about Idle calltips.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/idle.rst32
1 files changed, 29 insertions, 3 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 0634e54..9ed673f 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -435,9 +435,35 @@ Note that IDLE itself places quite a few modules in sys.modules, so
much can be found by default, e.g. the re module.
If you don't like the ACW popping up unbidden, simply make the delay
-longer or disable the extension. Or another option is the delay could
-be set to zero. Another alternative to preventing ACW popups is to
-disable the call tips extension.
+longer or disable the extension.
+
+Calltips
+^^^^^^^^
+
+A calltip is shown when one types :kbd:`(` after the name of an *acccessible*
+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.
+
+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.
Python Shell window
^^^^^^^^^^^^^^^^^^^