8000 [2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.… · python/cpython@77f0a41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 77f0a41

Browse files
miss-islingtonjcrotts
authored andcommitted
[2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) (GH-6405)
(cherry picked from commit ef5ce88) Co-authored-by: Jay Crotts <crotts.jay@gmail.com>
1 parent 325191b commit 77f0a41

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Doc/library/curses.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,12 @@ the following methods:
663663
character previously painter at that location. By default, the character
664664
position and attributes are the current settings for the window object.
665665

666+
.. note::
667+
668+
Writing outside the window, subwindow, or pad raises a :exc:`curses.error`.
669+
Attempting to write to the lower right corner of a window, subwindow,
670+
or pad will cause an exception to be raised after the character is printed.
671+
666672

667673
.. method:: window.addnstr(str, n[, attr])
668674
window.addnstr(y, x, str, n[, attr])
@@ -677,6 +683,12 @@ the following methods:
677683
Paint the string *str* at ``(y, x)`` with attributes *attr*, overwriting
678684
anything previously on the display.
679685

686+
.. note::
687+
688+
Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
689+
Attempting to write to the lower right corner of a window, subwindow,
690+
or pad will cause an exception to be raised after the string is printed.
691+
680692

681693
.. method:: window.attroff(attr)
682694

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add a note about curses.addch and curses.addstr exception behavior when
2+
writing outside a window, or pad.

0 commit comments

Comments
 (0)
0