diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 11e137bf109..ad449112832 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -724,11 +724,9 @@ to begin after the next tab stop. (They occur every 8 'characters'). Newline characters cause following text to appear on a new line. Other control characters are ignored or displayed as a space, box, or something else, depending on the operating system and font. (Moving the text cursor through -such output with arrow keys may exhibit some surprising spacing behavior.) +such output with arrow keys may exhibit some surprising spacing behavior.) :: -.. code-block:: none - - >>> s = 'a\tb\a<\x02><\r>\bc\nd' + >>> s = 'a\tb\a<\x02><\r>\bc\nd' # Enter 22 chars. >>> len(s) 14 >>> s # Display repr(s) diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index b654ab7f2c5..7e743e6d813 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -6,7 +6,7 @@
-The Shell window also has an output squeezing facility explained in the -the Python Shell window subsection below.
+The Shell window also has an output squeezing facility explained in the Python +Shell window subsection below.
A Tk Text widget, and hence IDLE’s Shell, displays characters (codepoints) -in the the BMP (Basic Multilingual Plane) subset of Unicode. -Which characters are displayed with a proper glyph and which with a -replacement box depends on the operating system and installed fonts. -Tab characters cause the following text to begin after -the next tab stop. (They occur every 8 ‘characters’). -Newline characters cause following text to appear on a new line. -Other control characters are ignored or displayed as a space, box, or -something else, depending on the operating system and font. -(Moving the text cursor through such output with arrow keys may exhibit -some surprising spacing behavior.)
->>> s = 'a\tb\a<\x02><\r>\bc\nd'
->>> len(s)
-14
->>> s # Display repr(s)
-'a\tb\x07<\x02><\r>\x08c\nd'
->>> print(s, end='') # Display s as is.
-# Result varies by OS and font. Try it.
+A Tk Text widget, and hence IDLE’s Shell, displays characters (codepoints) in
+the BMP (Basic Multilingual Plane) subset of Unicode. Which characters are
+displayed with a proper glyph and which with a replacement box depends on the
+operating system and installed fonts. Tab characters cause the following text
+to begin after the next tab stop. (They occur every 8 ‘characters’). Newline
+characters cause following text to appear on a new line. Other control
+characters are ignored or displayed as a space, box, or something else,
+depending on the operating system and font. (Moving the text cursor through
+such output with arrow keys may exhibit some surprising spacing behavior.)
+>>> s = 'a\tb\a<\x02><\r>\bc\nd' # Enter 22 chars.
+>>> len(s)
+14
+>>> s # Display repr(s)
+'a\tb\x07<\x02><\r>\x08c\nd'
+>>> print(s, end='') # Display s as is.
+# Result varies by OS and font. Try it.
The repr
function is used for interactive echo of expression
@@ -912,7 +910,7 @@ also used for testing.