summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-09-29 05:56:54 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-09-29 05:56:54 (GMT)
commit5fbeabcbb6ea1d4af91fea0bc96c3d01f47b728f (patch)
treec6caea73fed44d20ced4673d9eaa54a9ca2cdfef /Doc
parentb1edd5823c2ddeee854fc58fcef90f28b1b8d108 (diff)
parente471ab3434d9632af31b937d03616e693a9244a1 (diff)
downloadcpython-5fbeabcbb6ea1d4af91fea0bc96c3d01f47b728f.zip
cpython-5fbeabcbb6ea1d4af91fea0bc96c3d01f47b728f.tar.gz
cpython-5fbeabcbb6ea1d4af91fea0bc96c3d01f47b728f.tar.bz2
Merge with 3.5, Issue #24028: Add subsection about Idle calltips.
Diffstat (limited to 'Doc')
-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
^^^^^^^^^^^^^^^^^^^