From 1f7bd04c164e7d87de20d19f6c430e81cb36f082 Mon Sep 17 00:00:00 2001
From: Terry Jan Reedy
Date: Tue, 16 Jan 2024 23:58:24 -0500
Subject: [PATCH 1/5] gh-81479: For Help => IDLE Doc, stop double-spacing some
lists.
This matches Firefox format. Edge double-spaces non-simple
list but I think it looks worse.
---
Lib/idlelib/help.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
index dfccfcb9bda89a..1566f8318be5c9 100644
--- a/Lib/idlelib/help.py
+++ b/Lib/idlelib/help.py
@@ -102,7 +102,7 @@ def handle_starttag(self, tag, attrs):
if self.level > 0:
self.nested_dl = True
elif tag == 'li':
- s = '\n* ' if self.simplelist else '\n\n* '
+ s = '\n* ' #if self.simplelist else '\n\n* '
elif tag == 'dt':
s = '\n\n' if not self.nested_dl else '\n' # Avoid extra line.
self.nested_dl = False
From c329d053d8393d75a786057834301b45ea1beb79 Mon Sep 17 00:00:00 2001
From: Terry Jan Reedy
Date: Wed, 17 Jan 2024 00:06:55 -0500
Subject: [PATCH 2/5] Remove comment
---
Lib/idlelib/help.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
index 1566f8318be5c9..bdf4b2b29f11a2 100644
--- a/Lib/idlelib/help.py
+++ b/Lib/idlelib/help.py
@@ -102,7 +102,7 @@ def handle_starttag(self, tag, attrs):
if self.level > 0:
self.nested_dl = True
elif tag == 'li':
- s = '\n* ' #if self.simplelist else '\n\n* '
+ s = '\n* '
elif tag == 'dt':
s = '\n\n' if not self.nested_dl else '\n' # Avoid extra line.
self.nested_dl = False
From 15acca5066d0ebd79dc5b00d5308efb1970075c0 Mon Sep 17 00:00:00 2001
From: Terry Jan Reedy
Date: Wed, 17 Jan 2024 02:13:18 -0500
Subject: [PATCH 3/5] gh-72284: Revise lists in IDLE doc
* Tkinter is a fact, not necessarily a feature.
* Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.
* Improve shell bindings list.
---
Doc/library/idle.rst | 68 +++++++++++++++++--------------------------
Lib/idlelib/help.html | 66 ++++++++++++++++++-----------------------
2 files changed, 55 insertions(+), 79 deletions(-)
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index e710d0bacf3fee..8823ea3595bf43 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -18,8 +18,6 @@ IDLE is Python's Integrated Development and Learning Environment.
IDLE has the following features:
-* coded in 100% pure Python, using the :mod:`tkinter` GUI toolkit
-
* cross-platform: works mostly the same on Windows, Unix, and macOS
* Python shell window (interactive interpreter) with colorizing
@@ -422,41 +420,34 @@ and that other files do not. Run Python code with the Run menu.
Key bindings
^^^^^^^^^^^^
-In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix and
-the :kbd:`Command` key on macOS.
-
-* :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
-
-* :kbd:`C-Backspace` delete word left; :kbd:`C-Del` delete word to the right
-
-* Arrow keys and :kbd:`Page Up`/:kbd:`Page Down` to move around
-
-* :kbd:`C-LeftArrow` and :kbd:`C-RightArrow` moves by words
+The IDLE insertion cursor is a thin vertical bar between character
+positions. When characters are entered, the insertion cursor and
+everything to its right moves right one character and
+the new character is entered in the new space.
-* :kbd:`Home`/:kbd:`End` go to begin/end of line
+Several non-character keys move the cursor and possibly
+delete characters. Deletion does not puts text on the clipboard,
+but IDLE has an undo list. Wherever this doc discusses keys,
+'C' refers to the :kbd:`Control` key on Windows and
+Unix and the :kbd:`Command` key on macOS. (And all such dicussions
+assume that the keys have not been re-bound to something else.)
-* :kbd:`C-Home`/:kbd:`C-End` go to begin/end of file
+* Arrow keys move the cursor one character or line.
-* Some useful Emacs bindings are inherited from Tcl/Tk:
+* :kbd:`C-LeftArrow` and :kbd:`C-RightArrow` moves left or right one word.
- * :kbd:`C-a` beginning of line
+* :kbd:`Home` and :kbd:`End` go to the beginning or end of the line.
- * :kbd:`C-e` end of line
+* :kbd:`Page Up` and :kbd:`Page Down` go up or down one screen.
- * :kbd:`C-k` kill line (but doesn't put it in clipboard)
+* :kbd:`C-Home` and :kbd:`C-End` go to beginning or end of the file.
- * :kbd:`C-l` center window around the insertion point
+* :kbd:`Backspace` and :kbd:`Del` (or `C-d`) delete the previous or
+ next character.
- * :kbd:`C-b` go backward one character without deleting (usually you can
- also use the cursor key for this)
+* :kbd:`C-Backspace` and :kbd:`C-Del` delete one word left or right.
- * :kbd:`C-f` go forward one character without deleting (usually you can
- also use the cursor key for this)
-
- * :kbd:`C-p` go up one line (usually you can also use the cursor key for
- this)
-
- * :kbd:`C-d` delete next character
+* :kbd:`C-k` deletes ('kills') everything to the right.
Standard keybindings (like :kbd:`C-c` to copy and :kbd:`C-v` to paste)
may work. Keybindings are selected in the Configure IDLE dialog.
@@ -611,23 +602,18 @@ when one requests a restart on the Shell menu, or when one runs code
in an editor window.
The editing features described in previous subsections work when entering
-code interactively. IDLE's Shell window also responds to the following keys.
-
-* :kbd:`C-c` interrupts executing command
-
-* :kbd:`C-d` sends end-of-file; closes window if typed at a ``>>>`` prompt
-
-* :kbd:`Alt-/` (Expand word) is also useful to reduce typing
+code interactively. IDLE's Shell window also responds to the following:
- Command history
+* :kbd:`C-c` attemps to interrupt statement execution (but may fail).
- * :kbd:`Alt-p` retrieves previous command matching what you have typed. On
- macOS use :kbd:`C-p`.
+* :kbd:`C-d` closes Shell if typed at a ``>>>`` prompt.
- * :kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`.
+* :kbd:`Alt-p` and :kbd:`Alt-n` (:kbd:`C-p` and :kbd:`C-n` on macOS)
+ retrieve to the current prompt the previous or next previously
+ entered statement that matches anything already typed.
- * :kbd:`Return` while the cursor is on any previous command
- retrieves that command
+* :kbd:`Return` while the cursor is on any previous statement
+ appends the latter to anything already typed at the prompt.
Text colors
^^^^^^^^^^^
diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html
index 2dc463735d691e..827d230b54e159 100644
--- a/Lib/idlelib/help.html
+++ b/Lib/idlelib/help.html
@@ -226,7 +226,6 @@ Navigation
IDLE is Python’s Integrated Development and Learning Environment.
IDLE has the following features:
-coded in 100% pure Python, using the tkinter
GUI toolkit
cross-platform: works mostly the same on Windows, Unix, and macOS
Python shell window (interactive interpreter) with colorizing
of code input, output, and error messages
@@ -547,30 +546,26 @@ Editor windows
-C-d sends end-of-file; closes window if typed at a >>>
prompt
-Alt-/ (Expand word) is also useful to reduce typing
-Command history
+code interactively. IDLE’s Shell window also responds to the following:
-Alt-p retrieves previous command matching what you have typed. On
-macOS use C-p.
-Alt-n retrieves next. On macOS use C-n.
-Return while the cursor is on any previous command
-retrieves that command
-
-
+C-c attemps to interrupt statement execution (but may fail).
+C-d closes Shell if typed at a >>>
prompt.
+Alt-p and Alt-n (C-p and C-n on macOS)
+retrieve to the current prompt the previous or next previously
+entered statement that matches anything already typed.
+Return while the cursor is on any previous statement
+appends the latter to anything already typed at the prompt.
@@ -1190,7 +1180,7 @@ Navigation
- Last updated on Jan 16, 2024 (16:17 UTC).
+ Last updated on Jan 17, 2024 (06:57 UTC).
Found a bug?
From ebaceba9fc26b0828bec79a7c369b5b390ca6b2e Mon Sep 17 00:00:00 2001
From: Terry Jan Reedy
Date: Wed, 17 Jan 2024 02:17:30 -0500
Subject: [PATCH 4/5] news
---
Lib/idlelib/News3.txt | 3 +++
.../next/IDLE/2024-01-17-02-15-33.gh-issue-72284.cAQiYO.rst | 2 ++
2 files changed, 5 insertions(+)
create mode 100644 Misc/NEWS.d/next/IDLE/2024-01-17-02-15-33.gh-issue-72284.cAQiYO.rst
diff --git a/Lib/idlelib/News3.txt b/Lib/idlelib/News3.txt
index f6ddbca0e64b06..ee36fa7e1d5341 100644
--- a/Lib/idlelib/News3.txt
+++ b/Lib/idlelib/News3.txt
@@ -4,6 +4,9 @@ Released on 2024-10-xx
=========================
+gh-72284: Improve the lists of features, editor key bindings,
+and shell key bingings in the IDLE doc.
+
gh-113903: Fix rare failure of test.test_idle, in test_configdialog.
gh-113729: Fix the "Help -> IDLE Doc" menu bug in 3.11.7 and 3.12.1.
diff --git a/Misc/NEWS.d/next/IDLE/2024-01-17-02-15-33.gh-issue-72284.cAQiYO.rst b/Misc/NEWS.d/next/IDLE/2024-01-17-02-15-33.gh-issue-72284.cAQiYO.rst
new file mode 100644
index 00000000000000..f8ee18af8546b5
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2024-01-17-02-15-33.gh-issue-72284.cAQiYO.rst
@@ -0,0 +1,2 @@
+Improve the lists of features, editor key bindings, and shell key bingings
+in the IDLE doc.
From b8b7bcfaf9bdd5bf76875bcad466a9ea4fb74d74 Mon Sep 17 00:00:00 2001
From: Terry Jan Reedy
Date: Wed, 17 Jan 2024 02:34:39 -0500
Subject: [PATCH 5/5] Add missing role.
---
Doc/library/idle.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 8823ea3595bf43..249dc0ea6ba735 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -442,8 +442,8 @@ assume that the keys have not been re-bound to something else.)
* :kbd:`C-Home` and :kbd:`C-End` go to beginning or end of the file.
-* :kbd:`Backspace` and :kbd:`Del` (or `C-d`) delete the previous or
- next character.
+* :kbd:`Backspace` and :kbd:`Del` (or :kbd:`C-d`) delete the previous
+ or next character.
* :kbd:`C-Backspace` and :kbd:`C-Del` delete one word left or right.