Skip to content

Commit

Permalink
bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (G…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrotts authored and ned-deily committed Apr 7, 2018
1 parent 9e2be60 commit ef5ce88
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Doc/library/curses.rst
Expand Up @@ -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])
Expand All @@ -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)

Expand Down
@@ -0,0 +1,2 @@
Add a note about curses.addch and curses.addstr exception behavior when
writing outside a window, or pad.

0 comments on commit ef5ce88

Please sign in to comment.