]> granicus.if.org Git - python/commitdiff
[2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 7 Apr 2018 02:01:35 +0000 (19:01 -0700)
committerNed Deily <nad@python.org>
Sat, 7 Apr 2018 02:01:35 +0000 (22:01 -0400)
(cherry picked from commit ef5ce884a41c8553a7eff66ebace908c1dcc1f89)

Co-authored-by: Jay Crotts <crotts.jay@gmail.com>
Doc/library/curses.rst
Misc/NEWS.d/next/Documentation/2018-01-13-20-30-53.bpo-8243.s98r28.rst [new file with mode: 0644]

index b36b9d73e3537df7663e8483eeb4044810b41960..5ea246b83fe20922cd78a7cbe6a505dc281c1f34 100644 (file)
@@ -663,6 +663,12 @@ the following methods:
    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])
@@ -677,6 +683,12 @@ the following methods:
    Paint the 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 (file)
index 0000000..a3520d0
--- /dev/null
@@ -0,0 +1,2 @@
+Add a note about curses.addch and curses.addstr exception behavior when
+writing outside a window, or pad.