You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanid="id4"></span><h3>Calltips<aclass="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
512
-
<p>A calltip is shown when one types <kbdclass="kbd docutils literal notranslate">(</kbd> after the name of an <em>accessible</em>
513
-
function. A name expression may include dots and subscripts. A calltip
514
-
remains until it is clicked, the cursor is moved out of the argument area,
515
-
or <kbdclass="kbd docutils literal notranslate">)</kbd> is typed. When the cursor is in the argument part of a definition,
516
-
the menu or shortcut display a calltip.</p>
517
-
<p>A calltip consists of the function signature and the first line of the
518
-
docstring. For builtins without an accessible signature, the calltip
519
-
consists of all lines up the fifth line or the first blank line. These
520
-
details may change.</p>
521
-
<p>The set of <em>accessible</em> functions depends on what modules have been imported
522
-
into the user process, including those imported by Idle itself,
523
-
and what definitions have been run, all since the last restart.</p>
512
+
<p>A calltip is shown automatically when one types <kbdclass="kbd docutils literal notranslate">(</kbd> after the name
513
+
of an <em>accessible</em> function. A function name expression may include
514
+
dots and subscripts. A calltip remains until it is clicked, the cursor
515
+
is moved out of the argument area, or <kbdclass="kbd docutils literal notranslate">)</kbd> is typed. Whenever the
516
+
cursor is in the argument part of a definition, select Edit and “Show
517
+
Call Tip” on the menu or enter its shortcut to display a calltip.</p>
518
+
<p>The calltip consists of the function’s signature and docstring up to
519
+
the latter’s first blank line or the fifth non-blank line. (Some builtin
520
+
functions lack an accessible signature.) A ‘/’ or ‘*’ in the signature
521
+
indicates that the preceding or following arguments are passed by
522
+
position or name (keyword) only. Details are subject to change.</p>
523
+
<p>In Shell, the accessible functions depends on what modules have been
524
+
imported into the user process, including those imported by Idle itself,
525
+
and which definitions have been run, all since the last restart.</p>
524
526
<p>For example, restart the Shell and enter <codeclass="docutils literal notranslate"><spanclass="pre">itertools.count(</span></code>. A calltip
525
-
appears because Idle imports itertools into the user process for its own use.
526
-
(This could change.) Enter <codeclass="docutils literal notranslate"><spanclass="pre">turtle.write(</span></code> and nothing appears. Idle does
527
-
not import turtle. The menu or shortcut do nothing either. Enter
528
-
<codeclass="docutils literal notranslate"><spanclass="pre">import</span><spanclass="pre">turtle</span></code> and then <codeclass="docutils literal notranslate"><spanclass="pre">turtle.write(</span></code> will work.</p>
529
-
<p>In an editor, import statements have no effect until one runs the file. One
530
-
might want to run a file after writing the import statements at the top,
531
-
or immediately run an existing file before editing.</p>
527
+
appears because Idle imports itertools into the user process for its own
528
+
use. (This could change.) Enter <codeclass="docutils literal notranslate"><spanclass="pre">turtle.write(</span></code> and nothing appears.
529
+
Idle does not itself import turtle. The menu entry and shortcut also do
530
+
nothing. Enter <codeclass="docutils literal notranslate"><spanclass="pre">import</span><spanclass="pre">turtle</span></code>. Thereafter, <codeclass="docutils literal notranslate"><spanclass="pre">turtle.write(</span></code>
531
+
will display a calltip.</p>
532
+
<p>In an editor, import statements have no effect until one runs the file.
533
+
One might want to run a file after writing import statements, after
534
+
adding function definitions, or after opening an existing file.</p>
532
535
</div>
533
536
<divclass="section" id="code-context">
534
537
<spanid="id5"></span><h3>Code Context<aclass="headerlink" href="#code-context" title="Permalink to this headline">¶</a></h3>
@@ -975,7 +978,7 @@ <h3>Navigation</h3>
975
978
<br/>
976
979
<br/>
977
980
978
-
Last updated on Sep 09, 2020.
981
+
Last updated on Sep 22, 2020.
979
982
<ahref="https://docs.python.org/3/bugs.html">Found a bug</a>?
0 commit comments