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

Skip to content

Commit ef5ce88

Browse files
jcrottsned-deily
authored andcommitted
bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179)
1 parent 9e2be60 commit ef5ce88

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
@@ -685,6 +685,12 @@ the following methods and attributes:
685685
character previously painter at that location. By default, the character
686686
position and attributes are the current settings for the window object.
687687

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

689695
.. method:: window.addnstr(str, n[, attr])
690696
window.addnstr(y, x, str, n[, attr])
@@ -700,6 +706,12 @@ the following methods and attributes:
700706
Paint the character string *str* at ``(y, x)`` with attributes
701707
*attr*, overwriting anything previously on the display.
702708

709+
.. note::
710+
711+
Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
712+
Attempting to write to the lower right corner of a window, subwindow,
713+
or pad will cause an exception to be raised after the string is printed.
714+
703715

704716
.. method:: window.attroff(attr)
705717

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