diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-07 05:18:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-07 05:18:38 (GMT) |
commit | 25bd1073996f26ad4895d3eb2d09315361c3cc84 (patch) | |
tree | 332045d170d754a54db28c5eeb766178f6c18662 /Doc/library | |
parent | 7476fefb65075161d57435c8dd7e92437578d3c1 (diff) | |
download | cpython-25bd1073996f26ad4895d3eb2d09315361c3cc84.zip cpython-25bd1073996f26ad4895d3eb2d09315361c3cc84.tar.gz cpython-25bd1073996f26ad4895d3eb2d09315361c3cc84.tar.bz2 |
bpo-33000: Document that IDLE's shell has no line limit. (GH-10373)
A program that runs indefinitely can overfill memory.
(cherry picked from commit 76cd0c30d60961d1a10e2673834a455d2b51f695)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/idle.rst | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 44085e1..9be54fe 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -671,15 +671,23 @@ When a program outputs text, the result is determined by the corresponding output device. When IDLE executes user code, ``sys.stdout`` and ``sys.stderr`` are connected to the display area of IDLE's Shell. Some of its features are inherited from the underlying Tk Text widget. Others -are programmed additions. +are programmed additions. Where it matters, Shell is designed for development +rather than production runs. + +For instance, Shell never throws away output. A program that sends unlimited +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. Text widgets display a subset of Unicode, the Basic Multilingual Plane (BMP). Which characters get a proper glyph instead of a replacement box depends on the operating system and installed fonts. Newline characters cause following -text to appear on a new line, but other control characters are replaced -with a box. But note that the ``repr()`` function, which is used for -interactive echo of expression values, replaces control characters -with escape codes before they are output. +text to appear on a new line, but other control characters are either +replaced with a box or deleted. However, ``repr()``, which is used for +interactive echo of expression values, replaces control characters, +some BMP codepoints, and all non-BMP characters with escape codes +before they are output. Normal and error output are generally kept separate (on separate lines) from code input and each other. They each get different highlight colors. |