Skip to content

Commit e6391e0

Browse files
authored
gh-82006: IDLE doc improvements (#94349)
0. Update text start and stop conditions. 1. Title-case sections but not subsections. 2. Edit Shell Window sections: title, execute, restart.
1 parent edb10ca commit e6391e0

File tree

3 files changed

+330
-188
lines changed

3 files changed

+330
-188
lines changed

Doc/library/idle.rst

+24-11
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ for more on Help menu choices.
357357
single: Clear Breakpoint
358358
single: breakpoints
359359

360-
Context Menus
360+
Context menus
361361
^^^^^^^^^^^^^^^^^^^^^^^^^^
362362

363363
Open a context menu by right-clicking in a window (Control-click on macOS).
@@ -398,7 +398,7 @@ Squeeze
398398

399399
.. _editing-and-navigation:
400400

401-
Editing and navigation
401+
Editing and Navigation
402402
----------------------
403403

404404
Editor windows
@@ -576,17 +576,29 @@ line to the top of the editor.
576576
The text and background colors for the context pane can be configured under
577577
the Highlights tab in the Configure IDLE dialog.
578578

579-
Python Shell window
580-
^^^^^^^^^^^^^^^^^^^
579+
Shell window
580+
^^^^^^^^^^^^
581581

582-
With IDLE's Shell, one enters, edits, and recalls complete statements.
583-
Most consoles and terminals only work with a single physical line at a time.
582+
In IDLE's Shell, enter, edit, and recall complete statements. (Most
583+
consoles and terminals only work with a single physical line at a time).
584+
585+
Submit a single-line statement for execution by hitting :kbd:`Return`
586+
with the cursor anywhere on the line. If a line is extended with
587+
Backslash (:kbd:`\\`), the cursor must be on the last physical line.
588+
Submit a multi-line compound statement by entering a blank line after
589+
the statement.
584590

585591
When one pastes code into Shell, it is not compiled and possibly executed
586-
until one hits :kbd:`Return`. One may edit pasted code first.
587-
If one pastes more that one statement into Shell, the result will be a
592+
until one hits :kbd:`Return`, as specified above.
593+
One may edit pasted code first.
594+
If one pastes more than one statement into Shell, the result will be a
588595
:exc:`SyntaxError` when multiple statements are compiled as if they were one.
589596

597+
Lines containing`'RESTART'` mean that the user execution process has been
598+
re-started. This occurs when the user execution process has crashed,
599+
when one requests a restart on the Shell menu, or when one runs code
600+
in an editor window.
601+
590602
The editing features described in previous subsections work when entering
591603
code interactively. IDLE's Shell window also responds to the following keys.
592604

@@ -603,7 +615,8 @@ code interactively. IDLE's Shell window also responds to the following keys.
603615

604616
* :kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`.
605617

606-
* :kbd:`Return` while on any previous command retrieves that command
618+
* :kbd:`Return` while the cursor is on any previous command
619+
retrieves that command
607620

608621
Text colors
609622
^^^^^^^^^^^
@@ -627,7 +640,7 @@ Highlighting tab. The marking of debugger breakpoint lines in the editor and
627640
text in popups and dialogs is not user-configurable.
628641

629642

630-
Startup and code execution
643+
Startup and Code Execution
631644
--------------------------
632645

633646
Upon startup with the ``-s`` option, IDLE will execute the file referenced by
@@ -894,7 +907,7 @@ with the default subprocess if at all possible.
894907
.. deprecated:: 3.4
895908

896909

897-
Help and preferences
910+
Help and Preferences
898911
--------------------
899912

900913
.. _help-sources:

0 commit comments

Comments
 (0)