8000 [2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) by miss-islington · Pull Request #6405 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) #6405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (G…
…H-5179)

(cherry picked from commit ef5ce88)

Co-authored-by: Jay Crotts <crotts.jay@gmail.com>
  • Loading branch information
jcrotts authored and miss-islington committed Apr 7, 2018
commit b8afded2465513991ad8c8998134de67dc4094ae
12 changes: 12 additions & 0 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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)

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