|
4 | 4 | <html xmlns="http://www.w3.org/1999/xhtml">
|
5 | 5 | <head>
|
6 | 6 | <meta charset="utf-8" />
|
7 |
| - <title>IDLE — Python 3.9.0a4 documentation</title> |
| 7 | + <title>IDLE — Python 3.10.0a0 documentation</title> |
8 | 8 | <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
|
9 | 9 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
10 | 10 |
|
|
17 | 17 | <script type="text/javascript" src="../_static/sidebar.js"></script>
|
18 | 18 |
|
19 | 19 | <link rel="search" type="application/opensearchdescription+xml"
|
20 |
| - title="Search within Python 3.9.0a4 documentation" |
| 20 | + title="Search within Python 3.10.0a0 documentation" |
21 | 21 | href="../_static/opensearch.xml"/>
|
22 | 22 | <link rel="author" title="About these documents" href="../about.html" />
|
23 | 23 | <link rel="index" title="Index" href="../genindex.html" />
|
@@ -71,7 +71,7 @@ <h3>Navigation</h3>
|
71 | 71 |
|
72 | 72 |
|
73 | 73 | <li>
|
74 |
| - <a href="../index.html">3.9.0a4 Documentation</a> » |
| 74 | + <a href="../index.html">3.10.0a0 Documentation</a> » |
75 | 75 | </li>
|
76 | 76 |
|
77 | 77 | <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
@@ -201,7 +201,7 @@ <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and
|
201 | 201 | line visible. A request past the end of the file goes to the end.
|
202 | 202 | Clear any selection and update the line and column status.</p>
|
203 | 203 | </dd>
|
204 |
| -<dt>Show Completions</dt><dd><p>Open a scrollable list allowing selection of keywords and attributes. See |
| 204 | +<dt>Show Completions</dt><dd><p>Open a scrollable list allowing selection of existing names. See |
205 | 205 | <a class="reference internal" href="#completions"><span class="std std-ref">Completions</span></a> in the Editing and navigation section below.</p>
|
206 | 206 | </dd>
|
207 | 207 | <dt>Expand Word</dt><dd><p>Expand a prefix you have typed to match a full word in the same window;
|
@@ -465,38 +465,47 @@ <h3>Automatic indentation<a class="headerlink" href="#automatic-indentation" tit
|
465 | 465 | </div>
|
466 | 466 | <div class="section" id="completions">
|
467 | 467 | <span id="id3"></span><h3>Completions<a class="headerlink" href="#completions" title="Permalink to this headline">¶</a></h3>
|
468 |
| -<p>Completions are supplied for functions, classes, and attributes of classes, |
469 |
| -both built-in and user-defined. Completions are also provided for |
470 |
| -filenames.</p> |
471 |
| -<p>The AutoCompleteWindow (ACW) will open after a predefined delay (default is |
472 |
| -two seconds) after a ‘.’ or (in a string) an os.sep is typed. If after one |
473 |
| -of those characters (plus zero or more other characters) a tab is typed |
474 |
| -the ACW will open immediately if a possible continuation is found.</p> |
475 |
| -<p>If there is only one possible completion for the characters entered, a |
476 |
| -<kbd class="kbd docutils literal notranslate">Tab</kbd> will supply that completion without opening the ACW.</p> |
477 |
| -<p>‘Show Completions’ will force open a completions window, by default the |
478 |
| -<kbd class="kbd docutils literal notranslate">C-space</kbd> will open a completions window. In an empty |
479 |
| -string, this will contain the files in the current directory. On a |
480 |
| -blank line, it will contain the built-in and user-defined functions and |
481 |
| -classes in the current namespaces, plus any modules imported. If some |
482 |
| -characters have been entered, the ACW will attempt to be more specific.</p> |
483 |
| -<p>If a string of characters is typed, the ACW selection will jump to the |
484 |
| -entry most closely matching those characters. Entering a <kbd class="kbd docutils literal notranslate">tab</kbd> will |
485 |
| -cause the longest non-ambiguous match to be entered in the Editor window or |
486 |
| -Shell. Two <kbd class="kbd docutils literal notranslate">tab</kbd> in a row will supply the current ACW selection, as |
487 |
| -will return or a double click. Cursor keys, Page Up/Down, mouse selection, |
488 |
| -and the scroll wheel all operate on the ACW.</p> |
489 |
| -<p>“Hidden” attributes can be accessed by typing the beginning of hidden |
490 |
| -name after a ‘.’, e.g. ‘_’. This allows access to modules with |
491 |
| -<code class="docutils literal notranslate"><span class="pre">__all__</span></code> set, or to class-private attributes.</p> |
492 |
| -<p>Completions and the ‘Expand Word’ facility can save a lot of typing!</p> |
493 |
| -<p>Completions are currently limited to those in the namespaces. Names in |
494 |
| -an Editor window which are not via <code class="docutils literal notranslate"><span class="pre">__main__</span></code> and <a class="reference internal" href="sys.html#sys.modules" title="sys.modules"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.modules</span></code></a> will |
495 |
| -not be found. Run the module once with your imports to correct this situation. |
496 |
| -Note that IDLE itself places quite a few modules in sys.modules, so |
497 |
| -much can be found by default, e.g. the re module.</p> |
498 |
| -<p>If you don’t like the ACW popping up unbidden, simply make the delay |
499 |
| -longer or disable the extension.</p> |
| 468 | +<p>Completions are supplied, when requested and available, for module |
| 469 | +names, attributes of classes or functions, or filenames. Each request |
| 470 | +method displays a completion box with existing names. (See tab |
| 471 | +completions below for an exception.) For any box, change the name |
| 472 | +being completed and the item highlighted in the box by |
| 473 | +typing and deleting characters; by hitting <kbd class="kbd docutils literal notranslate">Up</kbd>, <kbd class="kbd docutils literal notranslate">Down</kbd>, |
| 474 | +<kbd class="kbd docutils literal notranslate">PageUp</kbd>, <kbd class="kbd docutils literal notranslate">PageDown</kbd>, <kbd class="kbd docutils literal notranslate">Home</kbd>, and <kbd class="kbd docutils literal notranslate">End</kbd> keys; |
| 475 | +and by a single click within the box. Close the box with <kbd class="kbd docutils literal notranslate">Escape</kbd>, |
| 476 | +<kbd class="kbd docutils literal notranslate">Enter</kbd>, and double <kbd class="kbd docutils literal notranslate">Tab</kbd> keys or clicks outside the box. |
| 477 | +A double click within the box selects and closes.</p> |
| 478 | +<p>One way to open a box is to type a key character and wait for a |
| 479 | +predefined interval. This defaults to 2 seconds; customize it |
| 480 | +in the settings dialog. (To prevent auto popups, set the delay to a |
| 481 | +large number of milliseconds, such as 100000000.) For imported module |
| 482 | +names or class or function attributes, type ‘.’. |
| 483 | +For filenames in the root directory, type <a class="reference internal" href="os.html#os.sep" title="os.sep"><code class="xref py py-data docutils literal notranslate"><span class="pre">os.sep</span></code></a> or |
| 484 | +data:<cite>os.altsep</cite> immediately after an opening quote. (On Windows, |
| 485 | +one can specify a drive first.) Move into subdirectories by typing a |
| 486 | +directory name and a separator.</p> |
| 487 | +<p>Instead of waiting, or after a box is closed. open a completion box |
| 488 | +immediately with Show Completions on the Edit menu. The default hot |
| 489 | +key is <kbd class="kbd docutils literal notranslate">C-space</kbd>. If one types a prefix for the desired name |
| 490 | +before opening the box, the first match is displayed. |
| 491 | +The result is the same as if one enters a prefix |
| 492 | +after the box is displayed. Show Completions after a quote completes |
| 493 | +filenames in the current directory instead of a root directory.</p> |
| 494 | +<p>Hitting <kbd class="kbd docutils literal notranslate">Tab</kbd> after a prefix usually has the same effect as Show |
| 495 | +Completions. (With no prefix, it indents.) However, if there is only |
| 496 | +one match to the prefix, that match is immediately added to the editor |
| 497 | +text without opening a box.</p> |
| 498 | +<p>Invoking ‘Show Completions’, or hitting <kbd class="kbd docutils literal notranslate">Tab</kbd> after a prefix, |
| 499 | +outside of a string and without a preceding ‘.’ opens a box with |
| 500 | +keywords, builtin names, and available module-level names.</p> |
| 501 | +<p>When editing code in an editor (as oppose to Shell), increase the |
| 502 | +available module-level names by running your code |
| 503 | +and not restarting the Shell thereafter. This is especially useful |
| 504 | +after adding imports at the top of a file. This also increases |
| 505 | +possible attribute completions.</p> |
| 506 | +<p>Completion boxes intially exclude names beginning with ‘_’ or, for |
| 507 | +modules, not included in ‘__all__’. The hidden names can be accessed |
| 508 | +by typing ‘_’ after ‘.’, either before or after the box is opened.</p> |
500 | 509 | </div>
|
501 | 510 | <div class="section" id="calltips">
|
502 | 511 | <span id="id4"></span><h3>Calltips<a class="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
|
@@ -935,7 +944,7 @@ <h3>Navigation</h3>
|
935 | 944 |
|
936 | 945 |
|
937 | 946 | <li>
|
938 |
| - <a href="../index.html">3.9.0a4 Documentation</a> » |
| 947 | + <a href="../index.html">3.10.0a0 Documentation</a> » |
939 | 948 | </li>
|
940 | 949 |
|
941 | 950 | <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
@@ -966,7 +975,7 @@ <h3>Navigation</h3>
|
966 | 975 | <br />
|
967 | 976 | <br />
|
968 | 977 |
|
969 |
| - Last updated on Mar 07, 2020. |
| 978 | + Last updated on Jul 08, 2020. |
970 | 979 | <a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
|
971 | 980 | <br />
|
972 | 981 |
|
|
0 commit comments