From a9bfbf858e6cb0e8a1b7a6abb1b863c0261cb258 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 13 Jan 2026 01:16:46 -0500 Subject: [PATCH 1/2] gh-143774 - Improve IDLE Format Paragraph doc Define 'paragraph' better and mention indent preservation, selection expansion, and length setting. --- Doc/library/idle.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index a16f46ef812400..d31fb1e9921e01 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -178,9 +178,14 @@ Format menu (Editor window only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Format Paragraph - Reformat the current blank-line-delimited paragraph in comment block or - multiline string or selected line in a string. All lines in the - paragraph will be formatted to less than N columns, where N defaults to 72. + Rewrap the current 'paragraph'. A paragraph is a contiguous block of + equally indented non-blank comments containing the text cursor, a + similar block of non-comment lines (expected to be within a multiline + string), or a selection of a subset of either. (Partial lines in a + selection expand to complete lines.) The resulting lines have the + same indent as before but a max length of N columns (characters). + Change the default N of 72 on the Window tab of IDLE Settings. + Avoid rewrapping code lines. Indent Region Shift selected lines right by the indent width (default 4 spaces). From 3a181aa220706730e0812e09340c930032ac0671 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 13 Jan 2026 01:21:51 -0500 Subject: [PATCH 2/2] News item --- .../next/IDLE/2026-01-13-01-21-20.gh-issue-143774.rqGwX1.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/IDLE/2026-01-13-01-21-20.gh-issue-143774.rqGwX1.rst diff --git a/Misc/NEWS.d/next/IDLE/2026-01-13-01-21-20.gh-issue-143774.rqGwX1.rst b/Misc/NEWS.d/next/IDLE/2026-01-13-01-21-20.gh-issue-143774.rqGwX1.rst new file mode 100644 index 00000000000000..dd15d1672b1b54 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2026-01-13-01-21-20.gh-issue-143774.rqGwX1.rst @@ -0,0 +1 @@ +Better explain the operation of Format / Format Paragraph.