From: Terry Jan Reedy
Date: Sat, 27 Apr 2019 03:22:36 +0000 (-0400)
Subject: Syntax highlight IDLE html doc code example. (GH-12981)
X-Git-Tag: v3.8.0a4~84
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55d035113dfb1bd90495c8571758f504ae8d4802;p=thirdparty%2FPython%2Fcpython.git
Syntax highlight IDLE html doc code example. (GH-12981)
The new markup is currently ignored by IDLE's tk doc display.
---
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 11e137bf1092..ad4491128326 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 b654ab7f2c5f..7e743e6d8137 100644
--- a/Lib/idlelib/help.html
+++ b/Lib/idlelib/help.html
@@ -6,7 +6,7 @@
- IDLE — Python 3.8.0a1 documentation
+ IDLE — Python 3.8.0a3 documentation
@@ -19,7 +19,7 @@
@@ -72,7 +72,7 @@
@@ -372,8 +372,8 @@ debugger. Breakpoints for a file are saved in the userâs .idlerc directory.
Go to file/line
Same as in Debug menu.
-
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.
Squeeze
If the cursor is over an output line, squeeze all the output between
@@ -673,24 +673,22 @@ output to Shell will eventually fill memory, resulting in a memory error.
In contrast, some system text windows only keep the last n lines of output.
A Windows console, for instance, keeps a user-settable 1 to 9999 lines,
with 300 the default.
-
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.