[Python-checkins] [3.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) (GH-6404)

Ned Deily webhook-mailer at python.org
Fri Apr 6 22:00:09 EDT 2018


https://github.com/python/cpython/commit/98e8ac8d82202aae32961f10b1014641ae1fffbf
commit: 98e8ac8d82202aae32961f10b1014641ae1fffbf
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ned Deily <nad at python.org>
date: 2018-04-06T22:00:06-04:00
summary:

[3.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) (GH-6404)

(cherry picked from commit ef5ce884a41c8553a7eff66ebace908c1dcc1f89)

Co-authored-by: Jay Crotts <crotts.jay at gmail.com>

files:
A Misc/NEWS.d/next/Documentation/2018-01-13-20-30-53.bpo-8243.s98r28.rst
M Doc/library/curses.rst

diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
index 13717f7b35e6..2a2ee2be84af 100644
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -685,6 +685,12 @@ the following methods and attributes:
    character previously painter at that location.  By default, the character
    position and attributes are the current settings for the window object.
 
+   .. note::
+
+      Writing outside the window, subwindow, or pad raises a :exc:`curses.error`.
+      Attempting to write to the lower right corner of a window, subwindow,
+      or pad will cause an exception to be raised after the character is printed.
+
 
 .. method:: window.addnstr(str, n[, attr])
             window.addnstr(y, x, str, n[, attr])
@@ -700,6 +706,12 @@ the following methods and attributes:
    Paint the character string *str* at ``(y, x)`` with attributes
    *attr*, overwriting anything previously on the display.
 
+   .. note::
+
+      Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
+      Attempting to write to the lower right corner of a window, subwindow,
+      or pad will cause an exception to be raised after the string is printed.
+
 
 .. method:: window.attroff(attr)
 
diff --git a/Misc/NEWS.d/next/Documentation/2018-01-13-20-30-53.bpo-8243.s98r28.rst b/Misc/NEWS.d/next/Documentation/2018-01-13-20-30-53.bpo-8243.s98r28.rst
new file mode 100644
index 000000000000..a3520d05c095
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2018-01-13-20-30-53.bpo-8243.s98r28.rst
@@ -0,0 +1,2 @@
+Add a note about curses.addch and curses.addstr exception behavior when
+writing outside a window, or pad.



More information about the Python-checkins mailing list