https://github.com/python/cpython/commit/e7f1216204b3cd80d840c3e7726290a914c9a6f9
commit: e7f1216204b3cd80d840c3e7726290a914c9a6f9
branch: 3.14
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-05-26T09:06:00Z
summary:
[3.14] gh-150285: Fix too long docstrings in the curses module (GH-150286)
(GH-150457)
(cherry picked from commit 4c0fe2d134f6ddaa4c705ffba073d9d5874b7fe4)
files:
M Lib/curses/textpad.py
M Modules/_curses_panel.c
M Modules/_cursesmodule.c
M Modules/clinic/_curses_panel.c.h
M Modules/clinic/_cursesmodule.c.h
diff --git a/Lib/curses/textpad.py b/Lib/curses/textpad.py
index aa87061b8d749e9..3a98fd6043a124e 100644
--- a/Lib/curses/textpad.py
+++ b/Lib/curses/textpad.py
@@ -23,7 +23,8 @@ class Textbox:
Ctrl-A Go to left edge of window.
Ctrl-B Cursor left, wrapping to previous line if appropriate.
Ctrl-D Delete character under cursor.
- Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces
on).
+ Ctrl-E Go to right edge (stripspaces off) or end of line
+ (stripspaces on).
Ctrl-F Cursor right, wrapping to next line when appropriate.
Ctrl-G Terminate, returning the window contents.
Ctrl-H Delete character backward.
@@ -34,11 +35,12 @@ class Textbox:
Ctrl-O Insert a blank line at cursor location.
Ctrl-P Cursor up; move up one line.
- Move operations do nothing if the cursor is at an edge where the movement
- is not possible. The following synonyms are supported where possible:
+ Move operations do nothing if the cursor is at an edge where the
+ movement is not possible. The following synonyms are supported where
+ possible:
- KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P, KEY_DOWN = Ctrl-N
- KEY_BACKSPACE = Ctrl-h
+ KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P,
+ KEY_DOWN = Ctrl-N, KEY_BACKSPACE = Ctrl-h
"""
def __init__(self, win, insert_mode=False):
self.win = win
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index 6afac17c76a8633..4d407072ae3f5f4 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -234,12 +234,13 @@ _curses_panel.panel.hide
Hide the panel.
-This does not delete the object, it just makes the window on screen invisible.
+This does not delete the object, it just makes the window on screen
+invisible.
[clinic start generated code]*/
static PyObject *
_curses_panel_panel_hide_impl(PyCursesPanelObject *self, PyTypeObject *cls)
-/*[clinic end generated code: output=cc6ab7203cdc1450 input=1bfc741f473e6055]*/
+/*[clinic end generated code: output=cc6ab7203cdc1450 input=805065e45e6fc1cd]*/
{
_curses_panel_state *state = PyType_GetModuleState(cls);
return PyCursesCheckERR(state, hide_panel(self->pan), "hide");
@@ -689,12 +690,13 @@ _curses_panel.update_panels
Updates the virtual screen after changes in the panel stack.
-This does not call curses.doupdate(), so you'll have to do this yourself.
+This does not call curses.doupdate(), so you'll have to do this
+yourself.
[clinic start generated code]*/
static PyObject *
_curses_panel_update_panels_impl(PyObject *module)
-/*[clinic end generated code: output=2f3b4c2e03d90ded input=5299624c9a708621]*/
+/*[clinic end generated code: output=2f3b4c2e03d90ded input=0d0db79f05ec3ef4]*/
{
PyCursesInitialised;
update_panels();
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index f4e7732b657d4ed..edd574f968db16b 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1214,10 +1214,10 @@ _curses.window.border
Draw a border around the edges of the window.
-Each parameter specifies the character to use for a specific part of the
-border. The characters can be specified as integers or as one-character
-strings. A 0 value for any parameter will cause the default character to be
-used for that parameter.
+Each parameter specifies the character to use for a specific part of
+the border. The characters can be specified as integers or as
+one-character strings. A 0 value for any parameter will cause the
+default character to be used for that parameter.
[clinic start generated code]*/
static PyObject *
@@ -1225,7 +1225,7 @@ _curses_window_border_impl(PyCursesWindowObject *self,
PyObject *ls,
PyObject *rs, PyObject *ts, PyObject *bs,
PyObject *tl, PyObject *tr, PyObject *bl,
PyObject *br)
-/*[clinic end generated code: output=670ef38d3d7c2aa3 input=e015f735d67a240b]*/
+/*[clinic end generated code: output=670ef38d3d7c2aa3 input=42568c1458221d24]*/
{
chtype ch[8];
int i;
@@ -1268,14 +1268,15 @@ _curses.window.box
Draw a border around the edges of the window.
-Similar to border(), but both ls and rs are verch and both ts and bs are
-horch. The default corner characters are always used by this function.
+Similar to border(), but both ls and rs are verch and both ts and bs
+are horch. The default corner characters are always used by this
+function.
[clinic start generated code]*/
static PyObject *
_curses_window_box_impl(PyCursesWindowObject *self, int group_right_1,
PyObject *verch, PyObject *horch)
-/*[clinic end generated code: output=f3fcb038bb287192 input=f00435f9c8c98f60]*/
+/*[clinic end generated code: output=f3fcb038bb287192 input=e11acb7dbf6790b6]*/
{
chtype ch1 = 0, ch2 = 0;
if (group_right_1) {
@@ -1434,15 +1435,15 @@ _curses.window.derwin
Create a sub-window (window-relative coordinates).
-derwin() is the same as calling subwin(), except that begin_y and begin_x
-are relative to the origin of the window, rather than relative to the entire
-screen.
+derwin() is the same as calling subwin(), except that begin_y and
+begin_x are relative to the origin of the window, rather than
+relative to the entire screen.
[clinic start generated code]*/
static PyObject *
_curses_window_derwin_impl(PyCursesWindowObject *self, int group_left_1,
int nlines, int ncols, int begin_y, int begin_x)
-/*[clinic end generated code: output=7924b112d9f70d6e input=966d9481f7f5022e]*/
+/*[clinic end generated code: output=7924b112d9f70d6e input=6efb50722be444ba]*/
{
WINDOW *win;
@@ -1541,15 +1542,16 @@ _curses.window.getch
Get a character code from terminal keyboard.
-The integer returned does not have to be in ASCII range: function keys,
-keypad keys and so on return numbers higher than 256. In no-delay mode, -1
-is returned if there is no input, else getch() waits until a key is pressed.
+The integer returned does not have to be in ASCII range: function
+keys, keypad keys and so on return numbers higher than 256. In
+no-delay mode, -1 is returned if there is no input, else getch()
+waits until a key is pressed.
[clinic start generated code]*/
static PyObject *
_curses_window_getch_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=e1639e87d545e676 input=73f350336b1ee8c8]*/
+/*[clinic end generated code: output=e1639e87d545e676 input=0dc5ff40e079787a]*/
{
int rtn;
@@ -1588,15 +1590,16 @@ _curses.window.getkey
Get a character (string) from terminal keyboard.
-Returning a string instead of an integer, as getch() does. Function keys,
-keypad keys and other special keys return a multibyte string containing the
-key name. In no-delay mode, an exception is raised if there is no input.
+Returning a string instead of an integer, as getch() does. Function
+keys, keypad keys and other special keys return a multibyte string
+containing the key name. In no-delay mode, an exception is raised
+if there is no input.
[clinic start generated code]*/
static PyObject *
_curses_window_getkey_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=8490a182db46b10f input=be2dee34f5cf57f8]*/
+/*[clinic end generated code: output=8490a182db46b10f input=bd24a7da1ed9c73b]*/
{
int rtn;
@@ -1845,15 +1848,15 @@ _curses.window.insch
Insert a character before the current or specified position.
-All characters to the right of the cursor are shifted one position right, with
-the rightmost characters on the line being lost.
+All characters to the right of the cursor are shifted one position
+right, with the rightmost characters on the line being lost.
[clinic start generated code]*/
static PyObject *
_curses_window_insch_impl(PyCursesWindowObject *self, int group_left_1,
int y, int x, PyObject *ch, int group_right_1,
long attr)
-/*[clinic end generated code: output=ade8cfe3a3bf3e34 input=336342756ee19812]*/
+/*[clinic end generated code: output=ade8cfe3a3bf3e34 input=d662a0f96f33e15a]*/
{
int rtn;
chtype ch_ = 0;
@@ -1884,13 +1887,14 @@ _curses.window.inch -> unsigned_long
Return the character at the given position in the window.
-The bottom 8 bits are the character proper, and upper bits are the attributes.
+The bottom 8 bits are the character proper, and upper bits are the
+attributes.
[clinic start generated code]*/
static unsigned long
_curses_window_inch_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=6c4719fe978fe86a input=fac23ee11e3b3a66]*/
+/*[clinic end generated code: output=6c4719fe978fe86a input=0d862382571c19d9]*/
{
unsigned long rtn;
@@ -1978,18 +1982,18 @@ _curses.window.insstr
Insert the string before the current or specified position.
-Insert a character string (as many characters as will fit on the line)
-before the character under the cursor. All characters to the right of
-the cursor are shifted right, with the rightmost characters on the line
-being lost. The cursor position does not change (after moving to y, x,
-if specified).
+Insert a character string (as many characters as will fit on the
+line) before the character under the cursor. All characters to the
+right of the cursor are shifted right, with the rightmost characters
+on the line being lost. The cursor position does not change (after
+moving to y, x, if specified).
[clinic start generated code]*/
static PyObject *
_curses_window_insstr_impl(PyCursesWindowObject *self, int group_left_1,
int y, int x, PyObject *str, int group_right_1,
long attr)
-/*[clinic end generated code: output=c259a5265ad0b777 input=6827cddc6340a7f3]*/
+/*[clinic end generated code: output=c259a5265ad0b777 input=dbfbdd3892155ea6]*/
{
int rtn;
int strtype;
@@ -2062,19 +2066,19 @@ _curses.window.insnstr
Insert at most n characters of the string.
-Insert a character string (as many characters as will fit on the line)
-before the character under the cursor, up to n characters. If n is zero
-or negative, the entire string is inserted. All characters to the right
-of the cursor are shifted right, with the rightmost characters on the line
-being lost. The cursor position does not change (after moving to y, x, if
-specified).
+Insert a character string (as many characters as will fit on the
+line) before the character under the cursor, up to n characters. If
+n is zero or negative, the entire string is inserted. All
+characters to the right of the cursor are shifted right, with the
+rightmost characters on the line being lost. The cursor position
+does not change (after moving to y, x, if specified).
[clinic start generated code]*/
static PyObject *
_curses_window_insnstr_impl(PyCursesWindowObject *self, int group_left_1,
int y, int x, PyObject *str, int n,
int group_right_1, long attr)
-/*[clinic end generated code: output=971a32ea6328ec8b input=70fa0cd543901a4c]*/
+/*[clinic end generated code: output=971a32ea6328ec8b input=fd0a9b65b84b385f]*/
{
int rtn;
int strtype;
@@ -2132,12 +2136,13 @@ _curses.window.is_linetouched
Return True if the specified line was modified, otherwise return False.
-Raise a curses.error exception if line is not valid for the given window.
+Raise a curses.error exception if line is not valid for the given
+window.
[clinic start generated code]*/
static PyObject *
_curses_window_is_linetouched_impl(PyCursesWindowObject *self, int line)
-/*[clinic end generated code: output=ad4a4edfee2db08c input=a7be0c189f243914]*/
+/*[clinic end generated code: output=ad4a4edfee2db08c input=b5c1149c36e58222]*/
{
int erg;
erg = is_linetouched(self->win, line);
@@ -2165,9 +2170,9 @@ _curses.window.noutrefresh
Mark for refresh but wait.
-This function updates the data structure representing the desired state of the
-window, but does not force an update of the physical screen. To accomplish
-that, call doupdate().
+This function updates the data structure representing the desired
+state of the window, but does not force an update of the physical
+screen. To accomplish that, call doupdate().
[clinic start generated code]*/
static PyObject *
@@ -2175,21 +2180,21 @@ _curses_window_noutrefresh_impl(PyCursesWindowObject
*self,
int group_right_1, int pminrow, int pmincol,
int sminrow, int smincol, int smaxrow,
int smaxcol)
-/*[clinic end generated code: output=809a1f3c6a03e23e input=3e56898388cd739e]*/
+/*[clinic end generated code: output=809a1f3c6a03e23e input=8b4c74bf55008803]*/
#else
/*[clinic input]
_curses.window.noutrefresh
Mark for refresh but wait.
-This function updates the data structure representing the desired state of the
-window, but does not force an update of the physical screen. To accomplish
-that, call doupdate().
+This function updates the data structure representing the desired
+state of the window, but does not force an update of the physical
+screen. To accomplish that, call doupdate().
[clinic start generated code]*/
static PyObject *
_curses_window_noutrefresh_impl(PyCursesWindowObject *self)
-/*[clinic end generated code: output=6ef6dec666643fee input=876902e3fa431dbd]*/
+/*[clinic end generated code: output=6ef6dec666643fee input=a7c6306f8af9d0dd]*/
#endif
{
int rtn;
@@ -2238,14 +2243,15 @@ _curses.window.overlay
Overlay the window on top of destwin.
-The windows need not be the same size, only the overlapping region is copied.
-This copy is non-destructive, which means that the current background
-character does not overwrite the old contents of destwin.
+The windows need not be the same size, only the overlapping region
+is copied. This copy is non-destructive, which means that the
+current background character does not overwrite the old contents of
+destwin.
-To get fine-grained control over the copied region, the second form of
-overlay() can be used. sminrow and smincol are the upper-left coordinates
-of the source window, and the other variables mark a rectangle in the
-destination window.
+To get fine-grained control over the copied region, the second form
+of overlay() can be used. sminrow and smincol are the upper-left
+coordinates of the source window, and the other variables mark
+a rectangle in the destination window.
[clinic start generated code]*/
static PyObject *
@@ -2253,7 +2259,7 @@ _curses_window_overlay_impl(PyCursesWindowObject *self,
PyCursesWindowObject *destwin, int group_right_1,
int sminrow, int smincol, int dminrow,
int dmincol, int dmaxrow, int dmaxcol)
-/*[clinic end generated code: output=82bb2c4cb443ca58 input=6e4b32a7c627a356]*/
+/*[clinic end generated code: output=82bb2c4cb443ca58 input=da0cec7f7bda1b3f]*/
{
int rtn;
@@ -2285,14 +2291,15 @@ _curses.window.overwrite
Overwrite the window on top of destwin.
-The windows need not be the same size, in which case only the overlapping
-region is copied. This copy is destructive, which means that the current
-background character overwrites the old contents of destwin.
+The windows need not be the same size, in which case only the
+overlapping region is copied. This copy is destructive, which means
+that the current background character overwrites the old contents of
+destwin.
-To get fine-grained control over the copied region, the second form of
-overwrite() can be used. sminrow and smincol are the upper-left coordinates
-of the source window, the other variables mark a rectangle in the destination
-window.
+To get fine-grained control over the copied region, the second form
+of overwrite() can be used. sminrow and smincol are the upper-left
+coordinates of the source window, the other variables mark
+a rectangle in the destination window.
[clinic start generated code]*/
static PyObject *
@@ -2301,7 +2308,7 @@ _curses_window_overwrite_impl(PyCursesWindowObject *self,
int group_right_1, int sminrow, int smincol,
int dminrow, int dmincol, int dmaxrow,
int dmaxcol)
-/*[clinic end generated code: output=12ae007d1681be28 input=d83dd8b24ff2bcc9]*/
+/*[clinic end generated code: output=12ae007d1681be28 input=4244ab8a97087898]*/
{
int rtn;
@@ -2399,23 +2406,24 @@ _curses.window.refresh
Update the display immediately.
Synchronize actual screen with previous drawing/deleting methods.
-The 6 optional arguments can only be specified when the window is a pad
-created with newpad(). The additional parameters are needed to indicate
-what part of the pad and screen are involved. pminrow and pmincol specify
-the upper left-hand corner of the rectangle to be displayed in the pad.
-sminrow, smincol, smaxrow, and smaxcol specify the edges of the rectangle to
-be displayed on the screen. The lower right-hand corner of the rectangle to
-be displayed in the pad is calculated from the screen coordinates, since the
-rectangles must be the same size. Both rectangles must be entirely contained
-within their respective structures. Negative values of pminrow, pmincol,
-sminrow, or smincol are treated as if they were zero.
+The 6 optional arguments can only be specified when the window is
+a pad created with newpad(). The additional parameters are needed
+to indicate what part of the pad and screen are involved. pminrow
+and pmincol specify the upper left-hand corner of the rectangle to
+be displayed in the pad. sminrow, smincol, smaxrow, and smaxcol
+specify the edges of the rectangle to be displayed on the screen.
+The lower right-hand corner of the rectangle to be displayed in the
+pad is calculated from the screen coordinates, since the rectangles
+must be the same size. Both rectangles must be entirely contained
+within their respective structures. Negative values of pminrow,
+pmincol, sminrow, or smincol are treated as if they were zero.
[clinic start generated code]*/
static PyObject *
_curses_window_refresh_impl(PyCursesWindowObject *self, int group_right_1,
int pminrow, int pmincol, int sminrow,
int smincol, int smaxrow, int smaxcol)
-/*[clinic end generated code: output=42199543115e6e63 input=95e01cb5ffc635d0]*/
+/*[clinic end generated code: output=42199543115e6e63 input=ff2e900c6b2696b1]*/
{
int rtn;
@@ -2484,14 +2492,14 @@ _curses.window.subwin
Create a sub-window (screen-relative coordinates).
-By default, the sub-window will extend from the specified position to the
-lower right corner of the window.
+By default, the sub-window will extend from the specified position
+to the lower right corner of the window.
[clinic start generated code]*/
static PyObject *
_curses_window_subwin_impl(PyCursesWindowObject *self, int group_left_1,
int nlines, int ncols, int begin_y, int begin_x)
-/*[clinic end generated code: output=93e898afc348f59a input=2129fa47fd57721c]*/
+/*[clinic end generated code: output=93e898afc348f59a input=07b5058cb8820595]*/
{
WINDOW *win;
@@ -2525,13 +2533,14 @@ _curses.window.scroll
Scroll the screen or scrolling region.
-Scroll upward if the argument is positive and downward if it is negative.
+Scroll upward if the argument is positive and downward if it is
+negative.
[clinic start generated code]*/
static PyObject *
_curses_window_scroll_impl(PyCursesWindowObject *self, int group_right_1,
int lines)
-/*[clinic end generated code: output=4541a8a11852d360 input=c969ca0cfabbdbec]*/
+/*[clinic end generated code: output=4541a8a11852d360 input=d8d81a5b52b9b40f]*/
{
if (!group_right_1) {
return PyCursesCheckERR_ForWin(self, scroll(self->win), "scroll");
@@ -2553,14 +2562,15 @@ _curses.window.touchline
Pretend count lines have been changed, starting with line start.
-If changed is supplied, it specifies whether the affected lines are marked
-as having been changed (changed=True) or unchanged (changed=False).
+If changed is supplied, it specifies whether the affected lines are
+marked as having been changed (changed=True) or unchanged
+(changed=False).
[clinic start generated code]*/
static PyObject *
_curses_window_touchline_impl(PyCursesWindowObject *self, int start,
int count, int group_right_1, int changed)
-/*[clinic end generated code: output=65d05b3f7438c61d input=a98aa4f79b6be845]*/
+/*[clinic end generated code: output=65d05b3f7438c61d input=e0dc62f90d9dea55]*/
{
if (!group_right_1) {
return PyCursesCheckERR_ForWin(self, touchline(self->win, start,
count), "touchline");
@@ -2889,16 +2899,17 @@ _curses.cbreak
Enter cbreak mode.
-In cbreak mode (sometimes called "rare" mode) normal tty line buffering is
-turned off and characters are available to be read one by one. However,
-unlike raw mode, special characters (interrupt, quit, suspend, and flow
-control) retain their effects on the tty driver and calling program.
-Calling first raw() then cbreak() leaves the terminal in cbreak mode.
+In cbreak mode (sometimes called "rare" mode) normal tty line buffering
+is turned off and characters are available to be read one by one.
+However, unlike raw mode, special characters (interrupt, quit, suspend,
+and flow control) retain their effects on the tty driver and calling
+program. Calling first raw() then cbreak() leaves the terminal in
+cbreak mode.
[clinic start generated code]*/
static PyObject *
_curses_cbreak_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=9f9dee9664769751 input=c7d0bddda93016c1]*/
+/*[clinic end generated code: output=9f9dee9664769751 input=42d81687f11ddbf3]*/
NoArgOrFlagNoReturnFunctionBody(cbreak, flag)
/*[clinic input]
@@ -2910,13 +2921,14 @@ _curses.color_content
Return the red, green, and blue (RGB) components of the specified color.
-A 3-tuple is returned, containing the R, G, B values for the given color,
-which will be between 0 (no component) and 1000 (maximum amount of component).
+A 3-tuple is returned, containing the R, G, B values for the given
+color, which will be between 0 (no component) and 1000 (maximum amount
+of component).
[clinic start generated code]*/
static PyObject *
_curses_color_content_impl(PyObject *module, int color_number)
-/*[clinic end generated code: output=17b466df7054e0de input=03b5ed0472662aea]*/
+/*[clinic end generated code: output=17b466df7054e0de input=c95fb50093fa0be0]*/
{
_CURSES_COLOR_VAL_TYPE r,g,b;
@@ -2943,12 +2955,13 @@ _curses.color_pair
Return the attribute value for displaying text in the specified color.
This attribute value can be combined with A_STANDOUT, A_REVERSE, and the
-other A_* attributes. pair_number() is the counterpart to this function.
+other A_* attributes. pair_number() is the counterpart to this
+function.
[clinic start generated code]*/
static PyObject *
_curses_color_pair_impl(PyObject *module, int pair_number)
-/*[clinic end generated code: output=60718abb10ce9feb input=6034e9146f343802]*/
+/*[clinic end generated code: output=60718abb10ce9feb input=cf74bb81d3cc3370]*/
{
PyCursesStatefulInitialised(module);
PyCursesStatefulInitialisedColor(module);
@@ -2966,14 +2979,14 @@ _curses.curs_set
Set the cursor state.
If the terminal supports the visibility requested, the previous cursor
-state is returned; otherwise, an exception is raised. On many terminals,
-the "visible" mode is an underline cursor and the "very visible" mode is
-a block cursor.
+state is returned; otherwise, an exception is raised. On many
+terminals, the "visible" mode is an underline cursor and the "very
+visible" mode is a block cursor.
[clinic start generated code]*/
static PyObject *
_curses_curs_set_impl(PyObject *module, int visibility)
-/*[clinic end generated code: output=ee8e62483b1d6cd4 input=81a7924a65d29504]*/
+/*[clinic end generated code: output=ee8e62483b1d6cd4 input=e010767a328f322b]*/
{
int erg;
@@ -3005,14 +3018,15 @@ _curses.def_shell_mode
Save the current terminal mode as the "shell" mode.
-The "shell" mode is the mode when the running program is not using curses.
+The "shell" mode is the mode when the running program is not using
+curses.
Subsequent calls to reset_shell_mode() will restore this mode.
[clinic start generated code]*/
static PyObject *
_curses_def_shell_mode_impl(PyObject *module)
-/*[clinic end generated code: output=d6e42f5c768f860f input=5ead21f6f0baa894]*/
+/*[clinic end generated code: output=d6e42f5c768f860f input=3809f85615c0b693]*/
NoArgNoReturnFunctionBody(def_shell_mode)
/*[clinic input]
@@ -3054,12 +3068,13 @@ _curses.echo
Enter echo mode.
-In echo mode, each character input is echoed to the screen as it is entered.
+In echo mode, each character input is echoed to the screen as it is
+entered.
[clinic start generated code]*/
static PyObject *
_curses_echo_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=03acb2ddfa6c8729 input=86cd4d5bb1d569c0]*/
+/*[clinic end generated code: output=03acb2ddfa6c8729 input=b4e9064326da9da4]*/
NoArgOrFlagNoReturnFunctionBody(echo, flag)
/*[clinic input]
@@ -3097,12 +3112,13 @@ _curses.flash
Flash the screen.
-That is, change it to reverse-video and then change it back in a short
interval.
+That is, change it to reverse-video and then change it back in a short
+interval.
[clinic start generated code]*/
static PyObject *
_curses_flash_impl(PyObject *module)
-/*[clinic end generated code: output=488b8a0ebd9ea9b8 input=02fdfb06c8fc3171]*/
+/*[clinic end generated code: output=488b8a0ebd9ea9b8 input=90878e305432add9]*/
NoArgNoReturnFunctionBody(flash)
/*[clinic input]
@@ -3110,13 +3126,13 @@ _curses.flushinp
Flush all input buffers.
-This throws away any typeahead that has been typed by the user and has not
-yet been processed by the program.
+This throws away any typeahead that has been typed by the user and has
+not yet been processed by the program.
[clinic start generated code]*/
static PyObject *
_curses_flushinp_impl(PyObject *module)
-/*[clinic end generated code: output=7e7a1fc1473960f5 input=59d042e705cef5ec]*/
+/*[clinic end generated code: output=7e7a1fc1473960f5 input=3a63c7213be8043c]*/
NoArgNoReturnVoidFunctionBody(flushinp)
#ifdef getsyx
@@ -3392,13 +3408,14 @@ _curses.init_pair
Change the definition of a color-pair.
-If the color-pair was previously initialized, the screen is refreshed and
-all occurrences of that color-pair are changed to the new definition.
+If the color-pair was previously initialized, the screen is refreshed
+and all occurrences of that color-pair are changed to the new
+definition.
[clinic start generated code]*/
static PyObject *
_curses_init_pair_impl(PyObject *module, int pair_number, int fg, int bg)
-/*[clinic end generated code: output=a0bba03d2bbc3ee6 input=54b421b44c12c389]*/
+/*[clinic end generated code: output=a0bba03d2bbc3ee6 input=5486c3a105130dae]*/
{
PyCursesStatefulInitialised(module);
PyCursesStatefulInitialisedColor(module);
@@ -3616,14 +3633,14 @@ _curses.get_escdelay
Gets the curses ESCDELAY setting.
-Gets the number of milliseconds to wait after reading an escape character,
-to distinguish between an individual escape character entered on the
-keyboard from escape sequences sent by cursor and function keys.
+Gets the number of milliseconds to wait after reading an escape
+character, to distinguish between an individual escape character entered
+on the keyboard from escape sequences sent by cursor and function keys.
[clinic start generated code]*/
static PyObject *
_curses_get_escdelay_impl(PyObject *module)
-/*[clinic end generated code: output=222fa1a822555d60 input=be2d5b3dd974d0a4]*/
+/*[clinic end generated code: output=222fa1a822555d60 input=b39eeae4b8f169ab]*/
{
return PyLong_FromLong(ESCDELAY);
}
@@ -3635,14 +3652,14 @@ _curses.set_escdelay
Sets the curses ESCDELAY setting.
-Sets the number of milliseconds to wait after reading an escape character,
-to distinguish between an individual escape character entered on the
-keyboard from escape sequences sent by cursor and function keys.
+Sets the number of milliseconds to wait after reading an escape
+character, to distinguish between an individual escape character entered
+on the keyboard from escape sequences sent by cursor and function keys.
[clinic start generated code]*/
static PyObject *
_curses_set_escdelay_impl(PyObject *module, int ms)
-/*[clinic end generated code: output=43818efbf7980ac4 input=7796fe19f111e250]*/
+/*[clinic end generated code: output=43818efbf7980ac4 input=cc2529bcdda3b06c]*/
{
if (ms <= 0) {
PyErr_SetString(PyExc_ValueError, "ms must be > 0");
@@ -3657,13 +3674,13 @@ _curses.get_tabsize
Gets the curses TABSIZE setting.
-Gets the number of columns used by the curses library when converting a tab
-character to spaces as it adds the tab to a window.
+Gets the number of columns used by the curses library when converting
+a tab character to spaces as it adds the tab to a window.
[clinic start generated code]*/
static PyObject *
_curses_get_tabsize_impl(PyObject *module)
-/*[clinic end generated code: output=7e9e51fb6126fbdf input=74af86bf6c9f5d7e]*/
+/*[clinic end generated code: output=7e9e51fb6126fbdf input=58bdaacb337c103b]*/
{
return PyLong_FromLong(TABSIZE);
}
@@ -3675,13 +3692,13 @@ _curses.set_tabsize
Sets the curses TABSIZE setting.
-Sets the number of columns used by the curses library when converting a tab
-character to spaces as it adds the tab to a window.
+Sets the number of columns used by the curses library when converting
+a tab character to spaces as it adds the tab to a window.
[clinic start generated code]*/
static PyObject *
_curses_set_tabsize_impl(PyObject *module, int size)
-/*[clinic end generated code: output=c1de5a76c0daab1e input=78cba6a3021ad061]*/
+/*[clinic end generated code: output=c1de5a76c0daab1e input=34c1be9a78cd28a2]*/
{
if (size <= 0) {
PyErr_SetString(PyExc_ValueError, "size must be > 0");
@@ -3792,13 +3809,13 @@ _curses.longname
Return the terminfo long name field describing the current terminal.
-The maximum length of a verbose description is 128 characters. It is defined
-only after the call to initscr().
+The maximum length of a verbose description is 128 characters. It is
+defined only after the call to initscr().
[clinic start generated code]*/
static PyObject *
_curses_longname_impl(PyObject *module)
-/*[clinic end generated code: output=fdf30433727ef568 input=84c3f20201b1098e]*/
+/*[clinic end generated code: output=fdf30433727ef568 input=a924fabba0de78a6]*/
NoArgReturnStringFunctionBody(longname)
/*[clinic input]
@@ -3833,13 +3850,13 @@ _curses.mouseinterval
Set and retrieve the maximum time between press and release in a click.
Set the maximum time that can elapse between press and release events in
-order for them to be recognized as a click, and return the previous interval
-value.
+order for them to be recognized as a click, and return the previous
+interval value.
[clinic start generated code]*/
static PyObject *
_curses_mouseinterval_impl(PyObject *module, int interval)
-/*[clinic end generated code: output=c4f5ff04354634c5 input=75aaa3f0db10ac4e]*/
+/*[clinic end generated code: output=c4f5ff04354634c5 input=b90249254389c080]*/
{
PyCursesStatefulInitialised(module);
@@ -3855,14 +3872,15 @@ _curses.mousemask
Set the mouse events to be reported, and return a tuple (availmask, oldmask).
Return a tuple (availmask, oldmask). availmask indicates which of the
-specified mouse events can be reported; on complete failure it returns 0.
-oldmask is the previous value of the given window's mouse event mask.
-If this function is never called, no mouse events are ever reported.
+specified mouse events can be reported; on complete failure it returns
+0. oldmask is the previous value of the given window's mouse event
+mask. If this function is never called, no mouse events are ever
+reported.
[clinic start generated code]*/
static PyObject *
_curses_mousemask_impl(PyObject *module, unsigned long newmask)
-/*[clinic end generated code: output=9406cf1b8a36e485 input=bdf76b7568a3c541]*/
+/*[clinic end generated code: output=9406cf1b8a36e485 input=e0b02b620ab30644]*/
{
mmask_t oldmask, availmask;
@@ -3945,14 +3963,14 @@ _curses.newwin
Return a new window.
-By default, the window will extend from the specified position to the lower
-right corner of the screen.
+By default, the window will extend from the specified position to the
+lower right corner of the screen.
[clinic start generated code]*/
static PyObject *
_curses_newwin_impl(PyObject *module, int nlines, int ncols,
int group_right_1, int begin_y, int begin_x)
-/*[clinic end generated code: output=c1e0a8dc8ac2826c input=29312c15a72a003d]*/
+/*[clinic end generated code: output=c1e0a8dc8ac2826c input=a1517cbfea4ab24b]*/
{
WINDOW *win;
@@ -3978,13 +3996,14 @@ _curses.nl
Enter newline mode.
-This mode translates the return key into newline on input, and translates
-newline into return and line-feed on output. Newline mode is initially on.
+This mode translates the return key into newline on input, and
+translates newline into return and line-feed on output. Newline mode
+is initially on.
[clinic start generated code]*/
static PyObject *
_curses_nl_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=b39cc0ffc9015003 input=18e3e9c6e8cfcf6f]*/
+/*[clinic end generated code: output=b39cc0ffc9015003 input=3fb21dcf55521ee4]*/
NoArgOrFlagNoReturnFunctionBody(nl, flag)
/*[clinic input]
@@ -4018,13 +4037,13 @@ _curses.nonl
Leave newline mode.
-Disable translation of return into newline on input, and disable low-level
-translation of newline into newline/return on output.
+Disable translation of return into newline on input, and disable
+low-level translation of newline into newline/return on output.
[clinic start generated code]*/
static PyObject *
_curses_nonl_impl(PyObject *module)
-/*[clinic end generated code: output=99e917e9715770c6 input=9d37dd122d3022fc]*/
+/*[clinic end generated code: output=99e917e9715770c6 input=75cce08e4b6b3ef1]*/
NoArgNoReturnFunctionBody(nonl)
/*[clinic input]
@@ -4237,13 +4256,13 @@ _curses.raw
Enter raw mode.
In raw mode, normal line buffering and processing of interrupt, quit,
-suspend, and flow control keys are turned off; characters are presented to
-curses input functions one by one.
+suspend, and flow control keys are turned off; characters are presented
+to curses input functions one by one.
[clinic start generated code]*/
static PyObject *
_curses_raw_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=a750e4b342be015b input=4b447701389fb4df]*/
+/*[clinic end generated code: output=a750e4b342be015b input=18a7de7eef16987a]*/
NoArgOrFlagNoReturnFunctionBody(raw, flag)
/*[clinic input]
@@ -4291,13 +4310,13 @@ _curses.resizeterm
Resize the standard and current windows to the specified dimensions.
-Adjusts other bookkeeping data used by the curses library that record the
-window dimensions (in particular the SIGWINCH handler).
+Adjusts other bookkeeping data used by the curses library that record
+the window dimensions (in particular the SIGWINCH handler).
[clinic start generated code]*/
static PyObject *
_curses_resizeterm_impl(PyObject *module, short nlines, short ncols)
-/*[clinic end generated code: output=4de3abab50c67f02 input=414e92a63e3e9899]*/
+/*[clinic end generated code: output=4de3abab50c67f02 input=7f0f077df2da1cf5]*/
{
PyObject *result;
@@ -4328,15 +4347,16 @@ _curses.resize_term
Backend function used by resizeterm(), performing most of the work.
When resizing the windows, resize_term() blank-fills the areas that are
-extended. The calling application should fill in these areas with appropriate
-data. The resize_term() function attempts to resize all windows. However,
-due to the calling convention of pads, it is not possible to resize these
-without additional interaction with the application.
+extended. The calling application should fill in these areas with
+appropriate data. The resize_term() function attempts to resize all
+windows. However, due to the calling convention of pads, it is not
+possible to resize these without additional interaction with the
+application.
[clinic start generated code]*/
static PyObject *
_curses_resize_term_impl(PyObject *module, short nlines, short ncols)
-/*[clinic end generated code: output=46c6d749fa291dbd input=276afa43d8ea7091]*/
+/*[clinic end generated code: output=46c6d749fa291dbd input=ff4baaf2320c8ac9]*/
{
PyObject *result;
@@ -4396,17 +4416,17 @@ _curses.start_color
Initializes eight basic colors and global variables COLORS and COLOR_PAIRS.
-Must be called if the programmer wants to use colors, and before any other
-color manipulation routine is called. It is good practice to call this
-routine right after initscr().
+Must be called if the programmer wants to use colors, and before any
+other color manipulation routine is called. It is good practice to call
+this routine right after initscr().
-It also restores the colors on the terminal to the values they had when the
-terminal was just turned on.
+It also restores the colors on the terminal to the values they had when
+the terminal was just turned on.
[clinic start generated code]*/
static PyObject *
_curses_start_color_impl(PyObject *module)
-/*[clinic end generated code: output=8b772b41d8090ede input=0ca0ecb2b77e1a12]*/
+/*[clinic end generated code: output=8b772b41d8090ede input=0eed9bc743283a8d]*/
{
PyCursesStatefulInitialised(module);
@@ -4495,13 +4515,13 @@ _curses.tigetnum
Return the value of the numeric capability.
-The value -2 is returned if capname is not a numeric capability, or -1 if
-it is canceled or absent from the terminal description.
+The value -2 is returned if capname is not a numeric capability, or -1
+if it is canceled or absent from the terminal description.
[clinic start generated code]*/
static PyObject *
_curses_tigetnum_impl(PyObject *module, const char *capname)
-/*[clinic end generated code: output=46f8b0a1b5dff42f input=5cdf2f410b109720]*/
+/*[clinic end generated code: output=46f8b0a1b5dff42f input=87a64beec16ae077]*/
{
PyCursesStatefulSetupTermCalled(module);
@@ -4517,13 +4537,13 @@ _curses.tigetstr
Return the value of the string capability.
-None is returned if capname is not a string capability, or is canceled or
-absent from the terminal description.
+None is returned if capname is not a string capability, or is canceled
+or absent from the terminal description.
[clinic start generated code]*/
static PyObject *
_curses_tigetstr_impl(PyObject *module, const char *capname)
-/*[clinic end generated code: output=f22b576ad60248f3 input=36644df25c73c0a7]*/
+/*[clinic end generated code: output=f22b576ad60248f3 input=00bf0feda2207724]*/
{
PyCursesStatefulSetupTermCalled(module);
@@ -4724,19 +4744,19 @@ _curses.use_env
Use environment variables LINES and COLUMNS.
-If used, this function should be called before initscr() or newterm() are
-called.
+If used, this function should be called before initscr() or newterm()
+are called.
-When flag is False, the values of lines and columns specified in the terminfo
-database will be used, even if environment variables LINES and COLUMNS (used
-by default) are set, or if curses is running in a window (in which case
-default behavior would be to use the window size if LINES and COLUMNS are
-not set).
+When flag is False, the values of lines and columns specified in the
+terminfo database will be used, even if environment variables LINES and
+COLUMNS (used by default) are set, or if curses is running in a window
+(in which case default behavior would be to use the window size if LINES
+and COLUMNS are not set).
[clinic start generated code]*/
static PyObject *
_curses_use_env_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=b2c445e435c0b164 input=06ac30948f2d78e4]*/
+/*[clinic end generated code: output=b2c445e435c0b164 input=8e8feed746cf7fc1]*/
{
use_env(flag);
Py_RETURN_NONE;
diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h
index 6f4966825ec4bf4..849fa233e328c46 100644
--- a/Modules/clinic/_curses_panel.c.h
+++ b/Modules/clinic/_curses_panel.c.h
@@ -35,7 +35,8 @@ PyDoc_STRVAR(_curses_panel_panel_hide__doc__,
"\n"
"Hide the panel.\n"
"\n"
-"This does not delete the object, it just makes the window on screen
invisible.");
+"This does not delete the object, it just makes the window on screen\n"
+"invisible.");
#define _CURSES_PANEL_PANEL_HIDE_METHODDEF \
{"hide", _PyCFunction_CAST(_curses_panel_panel_hide),
METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _curses_panel_panel_hide__doc__},
@@ -411,7 +412,8 @@ PyDoc_STRVAR(_curses_panel_update_panels__doc__,
"\n"
"Updates the virtual screen after changes in the panel stack.\n"
"\n"
-"This does not call curses.doupdate(), so you\'ll have to do this yourself.");
+"This does not call curses.doupdate(), so you\'ll have to do this\n"
+"yourself.");
#define _CURSES_PANEL_UPDATE_PANELS_METHODDEF \
{"update_panels", (PyCFunction)_curses_panel_update_panels, METH_NOARGS,
_curses_panel_update_panels__doc__},
@@ -424,4 +426,4 @@ _curses_panel_update_panels(PyObject *module, PyObject
*Py_UNUSED(ignored))
{
return _curses_panel_update_panels_impl(module);
}
-/*[clinic end generated code: output=36853ecb4a979814 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ef0da2e73543fd65 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h
index 8172440dc58c9d8..7945eb8ebc33464 100644
--- a/Modules/clinic/_cursesmodule.c.h
+++ b/Modules/clinic/_cursesmodule.c.h
@@ -422,10 +422,10 @@ PyDoc_STRVAR(_curses_window_border__doc__,
" br\n"
" Bottom-right corner.\n"
"\n"
-"Each parameter specifies the character to use for a specific part of the\n"
-"border. The characters can be specified as integers or as one-character\n"
-"strings. A 0 value for any parameter will cause the default character to
be\n"
-"used for that parameter.");
+"Each parameter specifies the character to use for a specific part of\n"
+"the border. The characters can be specified as integers or as\n"
+"one-character strings. A 0 value for any parameter will cause the\n"
+"default character to be used for that parameter.");
#define _CURSES_WINDOW_BORDER_METHODDEF \
{"border", _PyCFunction_CAST(_curses_window_border), METH_FASTCALL,
_curses_window_border__doc__},
@@ -500,8 +500,9 @@ PyDoc_STRVAR(_curses_window_box__doc__,
" horch\n"
" Top and bottom side.\n"
"\n"
-"Similar to border(), but both ls and rs are verch and both ts and bs are\n"
-"horch. The default corner characters are always used by this function.");
+"Similar to border(), but both ls and rs are verch and both ts and bs\n"
+"are horch. The default corner characters are always used by this\n"
+"function.");
#define _CURSES_WINDOW_BOX_METHODDEF \
{"box", (PyCFunction)_curses_window_box, METH_VARARGS,
_curses_window_box__doc__},
@@ -593,9 +594,9 @@ PyDoc_STRVAR(_curses_window_derwin__doc__,
" begin_x\n"
" Left side x-coordinate.\n"
"\n"
-"derwin() is the same as calling subwin(), except that begin_y and begin_x\n"
-"are relative to the origin of the window, rather than relative to the
entire\n"
-"screen.");
+"derwin() is the same as calling subwin(), except that begin_y and\n"
+"begin_x are relative to the origin of the window, rather than\n"
+"relative to the entire screen.");
#define _CURSES_WINDOW_DERWIN_METHODDEF \
{"derwin", (PyCFunction)_curses_window_derwin, METH_VARARGS,
_curses_window_derwin__doc__},
@@ -761,9 +762,10 @@ PyDoc_STRVAR(_curses_window_getch__doc__,
" x\n"
" X-coordinate.\n"
"\n"
-"The integer returned does not have to be in ASCII range: function keys,\n"
-"keypad keys and so on return numbers higher than 256. In no-delay mode, -1\n"
-"is returned if there is no input, else getch() waits until a key is
pressed.");
+"The integer returned does not have to be in ASCII range: function\n"
+"keys, keypad keys and so on return numbers higher than 256. In\n"
+"no-delay mode, -1 is returned if there is no input, else getch()\n"
+"waits until a key is pressed.");
#define _CURSES_WINDOW_GETCH_METHODDEF \
{"getch", (PyCFunction)_curses_window_getch, METH_VARARGS,
_curses_window_getch__doc__},
@@ -808,9 +810,10 @@ PyDoc_STRVAR(_curses_window_getkey__doc__,
" x\n"
" X-coordinate.\n"
"\n"
-"Returning a string instead of an integer, as getch() does. Function keys,\n"
-"keypad keys and other special keys return a multibyte string containing the\n"
-"key name. In no-delay mode, an exception is raised if there is no input.");
+"Returning a string instead of an integer, as getch() does. Function\n"
+"keys, keypad keys and other special keys return a multibyte string\n"
+"containing the key name. In no-delay mode, an exception is raised\n"
+"if there is no input.");
#define _CURSES_WINDOW_GETKEY_METHODDEF \
{"getkey", (PyCFunction)_curses_window_getkey, METH_VARARGS,
_curses_window_getkey__doc__},
@@ -979,8 +982,8 @@ PyDoc_STRVAR(_curses_window_insch__doc__,
" attr\n"
" Attributes for the character.\n"
"\n"
-"All characters to the right of the cursor are shifted one position right,
with\n"
-"the rightmost characters on the line being lost.");
+"All characters to the right of the cursor are shifted one position\n"
+"right, with the rightmost characters on the line being lost.");
#define _CURSES_WINDOW_INSCH_METHODDEF \
{"insch", (PyCFunction)_curses_window_insch, METH_VARARGS,
_curses_window_insch__doc__},
@@ -1045,7 +1048,8 @@ PyDoc_STRVAR(_curses_window_inch__doc__,
" x\n"
" X-coordinate.\n"
"\n"
-"The bottom 8 bits are the character proper, and upper bits are the
attributes.");
+"The bottom 8 bits are the character proper, and upper bits are the\n"
+"attributes.");
#define _CURSES_WINDOW_INCH_METHODDEF \
{"inch", (PyCFunction)_curses_window_inch, METH_VARARGS,
_curses_window_inch__doc__},
@@ -1099,11 +1103,11 @@ PyDoc_STRVAR(_curses_window_insstr__doc__,
" attr\n"
" Attributes for characters.\n"
"\n"
-"Insert a character string (as many characters as will fit on the line)\n"
-"before the character under the cursor. All characters to the right of\n"
-"the cursor are shifted right, with the rightmost characters on the line\n"
-"being lost. The cursor position does not change (after moving to y, x,\n"
-"if specified).");
+"Insert a character string (as many characters as will fit on the\n"
+"line) before the character under the cursor. All characters to the\n"
+"right of the cursor are shifted right, with the rightmost characters\n"
+"on the line being lost. The cursor position does not change (after\n"
+"moving to y, x, if specified).");
#define _CURSES_WINDOW_INSSTR_METHODDEF \
{"insstr", (PyCFunction)_curses_window_insstr, METH_VARARGS,
_curses_window_insstr__doc__},
@@ -1174,12 +1178,12 @@ PyDoc_STRVAR(_curses_window_insnstr__doc__,
" attr\n"
" Attributes for characters.\n"
"\n"
-"Insert a character string (as many characters as will fit on the line)\n"
-"before the character under the cursor, up to n characters. If n is zero\n"
-"or negative, the entire string is inserted. All characters to the right\n"
-"of the cursor are shifted right, with the rightmost characters on the line\n"
-"being lost. The cursor position does not change (after moving to y, x, if\n"
-"specified).");
+"Insert a character string (as many characters as will fit on the\n"
+"line) before the character under the cursor, up to n characters. If\n"
+"n is zero or negative, the entire string is inserted. All\n"
+"characters to the right of the cursor are shifted right, with the\n"
+"rightmost characters on the line being lost. The cursor position\n"
+"does not change (after moving to y, x, if specified).");
#define _CURSES_WINDOW_INSNSTR_METHODDEF \
{"insnstr", (PyCFunction)_curses_window_insnstr, METH_VARARGS,
_curses_window_insnstr__doc__},
@@ -1245,7 +1249,8 @@ PyDoc_STRVAR(_curses_window_is_linetouched__doc__,
" line\n"
" Line number.\n"
"\n"
-"Raise a curses.error exception if line is not valid for the given window.");
+"Raise a curses.error exception if line is not valid for the given\n"
+"window.");
#define _CURSES_WINDOW_IS_LINETOUCHED_METHODDEF \
{"is_linetouched", (PyCFunction)_curses_window_is_linetouched, METH_O,
_curses_window_is_linetouched__doc__},
@@ -1275,9 +1280,9 @@ PyDoc_STRVAR(_curses_window_noutrefresh__doc__,
"noutrefresh([pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol])\n"
"Mark for refresh but wait.\n"
"\n"
-"This function updates the data structure representing the desired state of
the\n"
-"window, but does not force an update of the physical screen. To accomplish\n"
-"that, call doupdate().");
+"This function updates the data structure representing the desired\n"
+"state of the window, but does not force an update of the physical\n"
+"screen. To accomplish that, call doupdate().");
#define _CURSES_WINDOW_NOUTREFRESH_METHODDEF \
{"noutrefresh", (PyCFunction)_curses_window_noutrefresh, METH_VARARGS,
_curses_window_noutrefresh__doc__},
@@ -1329,9 +1334,9 @@ PyDoc_STRVAR(_curses_window_noutrefresh__doc__,
"\n"
"Mark for refresh but wait.\n"
"\n"
-"This function updates the data structure representing the desired state of
the\n"
-"window, but does not force an update of the physical screen. To accomplish\n"
-"that, call doupdate().");
+"This function updates the data structure representing the desired\n"
+"state of the window, but does not force an update of the physical\n"
+"screen. To accomplish that, call doupdate().");
#define _CURSES_WINDOW_NOUTREFRESH_METHODDEF \
{"noutrefresh", (PyCFunction)_curses_window_noutrefresh, METH_NOARGS,
_curses_window_noutrefresh__doc__},
@@ -1351,14 +1356,15 @@ PyDoc_STRVAR(_curses_window_overlay__doc__,
"overlay(destwin, [sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol])\n"
"Overlay the window on top of destwin.\n"
"\n"
-"The windows need not be the same size, only the overlapping region is
copied.\n"
-"This copy is non-destructive, which means that the current background\n"
-"character does not overwrite the old contents of destwin.\n"
+"The windows need not be the same size, only the overlapping region\n"
+"is copied. This copy is non-destructive, which means that the\n"
+"current background character does not overwrite the old contents of\n"
+"destwin.\n"
"\n"
-"To get fine-grained control over the copied region, the second form of\n"
-"overlay() can be used. sminrow and smincol are the upper-left coordinates\n"
-"of the source window, and the other variables mark a rectangle in the\n"
-"destination window.");
+"To get fine-grained control over the copied region, the second form\n"
+"of overlay() can be used. sminrow and smincol are the upper-left\n"
+"coordinates of the source window, and the other variables mark\n"
+"a rectangle in the destination window.");
#define _CURSES_WINDOW_OVERLAY_METHODDEF \
{"overlay", (PyCFunction)_curses_window_overlay, METH_VARARGS,
_curses_window_overlay__doc__},
@@ -1409,14 +1415,15 @@ PyDoc_STRVAR(_curses_window_overwrite__doc__,
" dmaxcol])\n"
"Overwrite the window on top of destwin.\n"
"\n"
-"The windows need not be the same size, in which case only the overlapping\n"
-"region is copied. This copy is destructive, which means that the current\n"
-"background character overwrites the old contents of destwin.\n"
+"The windows need not be the same size, in which case only the\n"
+"overlapping region is copied. This copy is destructive, which means\n"
+"that the current background character overwrites the old contents of\n"
+"destwin.\n"
"\n"
-"To get fine-grained control over the copied region, the second form of\n"
-"overwrite() can be used. sminrow and smincol are the upper-left coordinates\n"
-"of the source window, the other variables mark a rectangle in the
destination\n"
-"window.");
+"To get fine-grained control over the copied region, the second form\n"
+"of overwrite() can be used. sminrow and smincol are the upper-left\n"
+"coordinates of the source window, the other variables mark\n"
+"a rectangle in the destination window.");
#define _CURSES_WINDOW_OVERWRITE_METHODDEF \
{"overwrite", (PyCFunction)_curses_window_overwrite, METH_VARARGS,
_curses_window_overwrite__doc__},
@@ -1535,16 +1542,17 @@ PyDoc_STRVAR(_curses_window_refresh__doc__,
"Update the display immediately.\n"
"\n"
"Synchronize actual screen with previous drawing/deleting methods.\n"
-"The 6 optional arguments can only be specified when the window is a pad\n"
-"created with newpad(). The additional parameters are needed to indicate\n"
-"what part of the pad and screen are involved. pminrow and pmincol specify\n"
-"the upper left-hand corner of the rectangle to be displayed in the pad.\n"
-"sminrow, smincol, smaxrow, and smaxcol specify the edges of the rectangle
to\n"
-"be displayed on the screen. The lower right-hand corner of the rectangle
to\n"
-"be displayed in the pad is calculated from the screen coordinates, since
the\n"
-"rectangles must be the same size. Both rectangles must be entirely
contained\n"
-"within their respective structures. Negative values of pminrow, pmincol,\n"
-"sminrow, or smincol are treated as if they were zero.");
+"The 6 optional arguments can only be specified when the window is\n"
+"a pad created with newpad(). The additional parameters are needed\n"
+"to indicate what part of the pad and screen are involved. pminrow\n"
+"and pmincol specify the upper left-hand corner of the rectangle to\n"
+"be displayed in the pad. sminrow, smincol, smaxrow, and smaxcol\n"
+"specify the edges of the rectangle to be displayed on the screen.\n"
+"The lower right-hand corner of the rectangle to be displayed in the\n"
+"pad is calculated from the screen coordinates, since the rectangles\n"
+"must be the same size. Both rectangles must be entirely contained\n"
+"within their respective structures. Negative values of pminrow,\n"
+"pmincol, sminrow, or smincol are treated as if they were zero.");
#define _CURSES_WINDOW_REFRESH_METHODDEF \
{"refresh", (PyCFunction)_curses_window_refresh, METH_VARARGS,
_curses_window_refresh__doc__},
@@ -1642,8 +1650,8 @@ PyDoc_STRVAR(_curses_window_subwin__doc__,
" begin_x\n"
" Left side x-coordinate.\n"
"\n"
-"By default, the sub-window will extend from the specified position to the\n"
-"lower right corner of the window.");
+"By default, the sub-window will extend from the specified position\n"
+"to the lower right corner of the window.");
#define _CURSES_WINDOW_SUBWIN_METHODDEF \
{"subwin", (PyCFunction)_curses_window_subwin, METH_VARARGS,
_curses_window_subwin__doc__},
@@ -1691,7 +1699,8 @@ PyDoc_STRVAR(_curses_window_scroll__doc__,
" lines\n"
" Number of lines to scroll.\n"
"\n"
-"Scroll upward if the argument is positive and downward if it is negative.");
+"Scroll upward if the argument is positive and downward if it is\n"
+"negative.");
#define _CURSES_WINDOW_SCROLL_METHODDEF \
{"scroll", (PyCFunction)_curses_window_scroll, METH_VARARGS,
_curses_window_scroll__doc__},
@@ -1730,8 +1739,9 @@ PyDoc_STRVAR(_curses_window_touchline__doc__,
"touchline(start, count, [changed=True])\n"
"Pretend count lines have been changed, starting with line start.\n"
"\n"
-"If changed is supplied, it specifies whether the affected lines are marked\n"
-"as having been changed (changed=True) or unchanged (changed=False).");
+"If changed is supplied, it specifies whether the affected lines are\n"
+"marked as having been changed (changed=True) or unchanged\n"
+"(changed=False).");
#define _CURSES_WINDOW_TOUCHLINE_METHODDEF \
{"touchline", (PyCFunction)_curses_window_touchline, METH_VARARGS,
_curses_window_touchline__doc__},
@@ -1925,11 +1935,12 @@ PyDoc_STRVAR(_curses_cbreak__doc__,
" flag\n"
" If false, the effect is the same as calling nocbreak().\n"
"\n"
-"In cbreak mode (sometimes called \"rare\" mode) normal tty line buffering
is\n"
-"turned off and characters are available to be read one by one. However,\n"
-"unlike raw mode, special characters (interrupt, quit, suspend, and flow\n"
-"control) retain their effects on the tty driver and calling program.\n"
-"Calling first raw() then cbreak() leaves the terminal in cbreak mode.");
+"In cbreak mode (sometimes called \"rare\" mode) normal tty line buffering\n"
+"is turned off and characters are available to be read one by one.\n"
+"However, unlike raw mode, special characters (interrupt, quit, suspend,\n"
+"and flow control) retain their effects on the tty driver and calling\n"
+"program. Calling first raw() then cbreak() leaves the terminal in\n"
+"cbreak mode.");
#define _CURSES_CBREAK_METHODDEF \
{"cbreak", _PyCFunction_CAST(_curses_cbreak), METH_FASTCALL,
_curses_cbreak__doc__},
@@ -1969,8 +1980,9 @@ PyDoc_STRVAR(_curses_color_content__doc__,
" color_number\n"
" The number of the color (0 - (COLORS-1)).\n"
"\n"
-"A 3-tuple is returned, containing the R, G, B values for the given color,\n"
-"which will be between 0 (no component) and 1000 (maximum amount of
component).");
+"A 3-tuple is returned, containing the R, G, B values for the given\n"
+"color, which will be between 0 (no component) and 1000 (maximum amount\n"
+"of component).");
#define _CURSES_COLOR_CONTENT_METHODDEF \
{"color_content", (PyCFunction)_curses_color_content, METH_O,
_curses_color_content__doc__},
@@ -2003,7 +2015,8 @@ PyDoc_STRVAR(_curses_color_pair__doc__,
" The number of the color pair.\n"
"\n"
"This attribute value can be combined with A_STANDOUT, A_REVERSE, and the\n"
-"other A_* attributes. pair_number() is the counterpart to this function.");
+"other A_* attributes. pair_number() is the counterpart to this\n"
+"function.");
#define _CURSES_COLOR_PAIR_METHODDEF \
{"color_pair", (PyCFunction)_curses_color_pair, METH_O,
_curses_color_pair__doc__},
@@ -2037,9 +2050,9 @@ PyDoc_STRVAR(_curses_curs_set__doc__,
" 0 for invisible, 1 for normal visible, or 2 for very visible.\n"
"\n"
"If the terminal supports the visibility requested, the previous cursor\n"
-"state is returned; otherwise, an exception is raised. On many terminals,\n"
-"the \"visible\" mode is an underline cursor and the \"very visible\" mode
is\n"
-"a block cursor.");
+"state is returned; otherwise, an exception is raised. On many\n"
+"terminals, the \"visible\" mode is an underline cursor and the \"very\n"
+"visible\" mode is a block cursor.");
#define _CURSES_CURS_SET_METHODDEF \
{"curs_set", (PyCFunction)_curses_curs_set, METH_O,
_curses_curs_set__doc__},
@@ -2091,7 +2104,8 @@ PyDoc_STRVAR(_curses_def_shell_mode__doc__,
"\n"
"Save the current terminal mode as the \"shell\" mode.\n"
"\n"
-"The \"shell\" mode is the mode when the running program is not using
curses.\n"
+"The \"shell\" mode is the mode when the running program is not using\n"
+"curses.\n"
"\n"
"Subsequent calls to reset_shell_mode() will restore this mode.");
@@ -2165,7 +2179,8 @@ PyDoc_STRVAR(_curses_echo__doc__,
" flag\n"
" If false, the effect is the same as calling noecho().\n"
"\n"
-"In echo mode, each character input is echoed to the screen as it is
entered.");
+"In echo mode, each character input is echoed to the screen as it is\n"
+"entered.");
#define _CURSES_ECHO_METHODDEF \
{"echo", _PyCFunction_CAST(_curses_echo), METH_FASTCALL,
_curses_echo__doc__},
@@ -2238,7 +2253,8 @@ PyDoc_STRVAR(_curses_flash__doc__,
"\n"
"Flash the screen.\n"
"\n"
-"That is, change it to reverse-video and then change it back in a short
interval.");
+"That is, change it to reverse-video and then change it back in a short\n"
+"interval.");
#define _CURSES_FLASH_METHODDEF \
{"flash", (PyCFunction)_curses_flash, METH_NOARGS, _curses_flash__doc__},
@@ -2258,8 +2274,8 @@ PyDoc_STRVAR(_curses_flushinp__doc__,
"\n"
"Flush all input buffers.\n"
"\n"
-"This throws away any typeahead that has been typed by the user and has not\n"
-"yet been processed by the program.");
+"This throws away any typeahead that has been typed by the user and has\n"
+"not yet been processed by the program.");
#define _CURSES_FLUSHINP_METHODDEF \
{"flushinp", (PyCFunction)_curses_flushinp, METH_NOARGS,
_curses_flushinp__doc__},
@@ -2614,8 +2630,9 @@ PyDoc_STRVAR(_curses_init_pair__doc__,
" bg\n"
" Background color number (-1 - (COLORS-1)).\n"
"\n"
-"If the color-pair was previously initialized, the screen is refreshed and\n"
-"all occurrences of that color-pair are changed to the new definition.");
+"If the color-pair was previously initialized, the screen is refreshed\n"
+"and all occurrences of that color-pair are changed to the new\n"
+"definition.");
#define _CURSES_INIT_PAIR_METHODDEF \
{"init_pair", _PyCFunction_CAST(_curses_init_pair), METH_FASTCALL,
_curses_init_pair__doc__},
@@ -2774,9 +2791,9 @@ PyDoc_STRVAR(_curses_get_escdelay__doc__,
"\n"
"Gets the curses ESCDELAY setting.\n"
"\n"
-"Gets the number of milliseconds to wait after reading an escape character,\n"
-"to distinguish between an individual escape character entered on the\n"
-"keyboard from escape sequences sent by cursor and function keys.");
+"Gets the number of milliseconds to wait after reading an escape\n"
+"character, to distinguish between an individual escape character entered\n"
+"on the keyboard from escape sequences sent by cursor and function keys.");
#define _CURSES_GET_ESCDELAY_METHODDEF \
{"get_escdelay", (PyCFunction)_curses_get_escdelay, METH_NOARGS,
_curses_get_escdelay__doc__},
@@ -2803,9 +2820,9 @@ PyDoc_STRVAR(_curses_set_escdelay__doc__,
" ms\n"
" length of the delay in milliseconds.\n"
"\n"
-"Sets the number of milliseconds to wait after reading an escape character,\n"
-"to distinguish between an individual escape character entered on the\n"
-"keyboard from escape sequences sent by cursor and function keys.");
+"Sets the number of milliseconds to wait after reading an escape\n"
+"character, to distinguish between an individual escape character entered\n"
+"on the keyboard from escape sequences sent by cursor and function keys.");
#define _CURSES_SET_ESCDELAY_METHODDEF \
{"set_escdelay", (PyCFunction)_curses_set_escdelay, METH_O,
_curses_set_escdelay__doc__},
@@ -2839,8 +2856,8 @@ PyDoc_STRVAR(_curses_get_tabsize__doc__,
"\n"
"Gets the curses TABSIZE setting.\n"
"\n"
-"Gets the number of columns used by the curses library when converting a tab\n"
-"character to spaces as it adds the tab to a window.");
+"Gets the number of columns used by the curses library when converting\n"
+"a tab character to spaces as it adds the tab to a window.");
#define _CURSES_GET_TABSIZE_METHODDEF \
{"get_tabsize", (PyCFunction)_curses_get_tabsize, METH_NOARGS,
_curses_get_tabsize__doc__},
@@ -2867,8 +2884,8 @@ PyDoc_STRVAR(_curses_set_tabsize__doc__,
" size\n"
" rendered cell width of a tab character.\n"
"\n"
-"Sets the number of columns used by the curses library when converting a tab\n"
-"character to spaces as it adds the tab to a window.");
+"Sets the number of columns used by the curses library when converting\n"
+"a tab character to spaces as it adds the tab to a window.");
#define _CURSES_SET_TABSIZE_METHODDEF \
{"set_tabsize", (PyCFunction)_curses_set_tabsize, METH_O,
_curses_set_tabsize__doc__},
@@ -3039,8 +3056,8 @@ PyDoc_STRVAR(_curses_longname__doc__,
"\n"
"Return the terminfo long name field describing the current terminal.\n"
"\n"
-"The maximum length of a verbose description is 128 characters. It is
defined\n"
-"only after the call to initscr().");
+"The maximum length of a verbose description is 128 characters. It is\n"
+"defined only after the call to initscr().");
#define _CURSES_LONGNAME_METHODDEF \
{"longname", (PyCFunction)_curses_longname, METH_NOARGS,
_curses_longname__doc__},
@@ -3097,8 +3114,8 @@ PyDoc_STRVAR(_curses_mouseinterval__doc__,
" Time in milliseconds.\n"
"\n"
"Set the maximum time that can elapse between press and release events in\n"
-"order for them to be recognized as a click, and return the previous
interval\n"
-"value.");
+"order for them to be recognized as a click, and return the previous\n"
+"interval value.");
#define _CURSES_MOUSEINTERVAL_METHODDEF \
{"mouseinterval", (PyCFunction)_curses_mouseinterval, METH_O,
_curses_mouseinterval__doc__},
@@ -3133,9 +3150,10 @@ PyDoc_STRVAR(_curses_mousemask__doc__,
"Set the mouse events to be reported, and return a tuple (availmask,
oldmask).\n"
"\n"
"Return a tuple (availmask, oldmask). availmask indicates which of the\n"
-"specified mouse events can be reported; on complete failure it returns 0.\n"
-"oldmask is the previous value of the given window\'s mouse event mask.\n"
-"If this function is never called, no mouse events are ever reported.");
+"specified mouse events can be reported; on complete failure it returns\n"
+"0. oldmask is the previous value of the given window\'s mouse event\n"
+"mask. If this function is never called, no mouse events are ever\n"
+"reported.");
#define _CURSES_MOUSEMASK_METHODDEF \
{"mousemask", (PyCFunction)_curses_mousemask, METH_O,
_curses_mousemask__doc__},
@@ -3252,8 +3270,8 @@ PyDoc_STRVAR(_curses_newwin__doc__,
" begin_x\n"
" Left side x-coordinate.\n"
"\n"
-"By default, the window will extend from the specified position to the lower\n"
-"right corner of the screen.");
+"By default, the window will extend from the specified position to the\n"
+"lower right corner of the screen.");
#define _CURSES_NEWWIN_METHODDEF \
{"newwin", (PyCFunction)_curses_newwin, METH_VARARGS,
_curses_newwin__doc__},
@@ -3303,8 +3321,9 @@ PyDoc_STRVAR(_curses_nl__doc__,
" flag\n"
" If false, the effect is the same as calling nonl().\n"
"\n"
-"This mode translates the return key into newline on input, and translates\n"
-"newline into return and line-feed on output. Newline mode is initially on.");
+"This mode translates the return key into newline on input, and\n"
+"translates newline into return and line-feed on output. Newline mode\n"
+"is initially on.");
#define _CURSES_NL_METHODDEF \
{"nl", _PyCFunction_CAST(_curses_nl), METH_FASTCALL, _curses_nl__doc__},
@@ -3381,8 +3400,8 @@ PyDoc_STRVAR(_curses_nonl__doc__,
"\n"
"Leave newline mode.\n"
"\n"
-"Disable translation of return into newline on input, and disable low-level\n"
-"translation of newline into newline/return on output.");
+"Disable translation of return into newline on input, and disable\n"
+"low-level translation of newline into newline/return on output.");
#define _CURSES_NONL_METHODDEF \
{"nonl", (PyCFunction)_curses_nonl, METH_NOARGS, _curses_nonl__doc__},
@@ -3598,8 +3617,8 @@ PyDoc_STRVAR(_curses_raw__doc__,
" If false, the effect is the same as calling noraw().\n"
"\n"
"In raw mode, normal line buffering and processing of interrupt, quit,\n"
-"suspend, and flow control keys are turned off; characters are presented to\n"
-"curses input functions one by one.");
+"suspend, and flow control keys are turned off; characters are presented\n"
+"to curses input functions one by one.");
#define _CURSES_RAW_METHODDEF \
{"raw", _PyCFunction_CAST(_curses_raw), METH_FASTCALL, _curses_raw__doc__},
@@ -3697,8 +3716,8 @@ PyDoc_STRVAR(_curses_resizeterm__doc__,
" ncols\n"
" Width.\n"
"\n"
-"Adjusts other bookkeeping data used by the curses library that record the\n"
-"window dimensions (in particular the SIGWINCH handler).");
+"Adjusts other bookkeeping data used by the curses library that record\n"
+"the window dimensions (in particular the SIGWINCH handler).");
#define _CURSES_RESIZETERM_METHODDEF \
{"resizeterm", _PyCFunction_CAST(_curses_resizeterm), METH_FASTCALL,
_curses_resizeterm__doc__},
@@ -3776,10 +3795,11 @@ PyDoc_STRVAR(_curses_resize_term__doc__,
" Width.\n"
"\n"
"When resizing the windows, resize_term() blank-fills the areas that are\n"
-"extended. The calling application should fill in these areas with
appropriate\n"
-"data. The resize_term() function attempts to resize all windows. However,\n"
-"due to the calling convention of pads, it is not possible to resize these\n"
-"without additional interaction with the application.");
+"extended. The calling application should fill in these areas with\n"
+"appropriate data. The resize_term() function attempts to resize all\n"
+"windows. However, due to the calling convention of pads, it is not\n"
+"possible to resize these without additional interaction with the\n"
+"application.");
#define _CURSES_RESIZE_TERM_METHODDEF \
{"resize_term", _PyCFunction_CAST(_curses_resize_term), METH_FASTCALL,
_curses_resize_term__doc__},
@@ -3914,12 +3934,12 @@ PyDoc_STRVAR(_curses_start_color__doc__,
"\n"
"Initializes eight basic colors and global variables COLORS and COLOR_PAIRS.\n"
"\n"
-"Must be called if the programmer wants to use colors, and before any other\n"
-"color manipulation routine is called. It is good practice to call this\n"
-"routine right after initscr().\n"
+"Must be called if the programmer wants to use colors, and before any\n"
+"other color manipulation routine is called. It is good practice to call\n"
+"this routine right after initscr().\n"
"\n"
-"It also restores the colors on the terminal to the values they had when the\n"
-"terminal was just turned on.");
+"It also restores the colors on the terminal to the values they had when\n"
+"the terminal was just turned on.");
#define _CURSES_START_COLOR_METHODDEF \
{"start_color", (PyCFunction)_curses_start_color, METH_NOARGS,
_curses_start_color__doc__},
@@ -4021,8 +4041,8 @@ PyDoc_STRVAR(_curses_tigetnum__doc__,
" capname\n"
" The terminfo capability name.\n"
"\n"
-"The value -2 is returned if capname is not a numeric capability, or -1 if\n"
-"it is canceled or absent from the terminal description.");
+"The value -2 is returned if capname is not a numeric capability, or -1\n"
+"if it is canceled or absent from the terminal description.");
#define _CURSES_TIGETNUM_METHODDEF \
{"tigetnum", (PyCFunction)_curses_tigetnum, METH_O,
_curses_tigetnum__doc__},
@@ -4064,8 +4084,8 @@ PyDoc_STRVAR(_curses_tigetstr__doc__,
" capname\n"
" The terminfo capability name.\n"
"\n"
-"None is returned if capname is not a string capability, or is canceled or\n"
-"absent from the terminal description.");
+"None is returned if capname is not a string capability, or is canceled\n"
+"or absent from the terminal description.");
#define _CURSES_TIGETSTR_METHODDEF \
{"tigetstr", (PyCFunction)_curses_tigetstr, METH_O,
_curses_tigetstr__doc__},
@@ -4219,14 +4239,14 @@ PyDoc_STRVAR(_curses_use_env__doc__,
"\n"
"Use environment variables LINES and COLUMNS.\n"
"\n"
-"If used, this function should be called before initscr() or newterm() are\n"
-"called.\n"
+"If used, this function should be called before initscr() or newterm()\n"
+"are called.\n"
"\n"
-"When flag is False, the values of lines and columns specified in the
terminfo\n"
-"database will be used, even if environment variables LINES and COLUMNS
(used\n"
-"by default) are set, or if curses is running in a window (in which case\n"
-"default behavior would be to use the window size if LINES and COLUMNS are\n"
-"not set).");
+"When flag is False, the values of lines and columns specified in the\n"
+"terminfo database will be used, even if environment variables LINES and\n"
+"COLUMNS (used by default) are set, or if curses is running in a window\n"
+"(in which case default behavior would be to use the window size if LINES\n"
+"and COLUMNS are not set).");
#define _CURSES_USE_ENV_METHODDEF \
{"use_env", (PyCFunction)_curses_use_env, METH_O, _curses_use_env__doc__},
@@ -4435,4 +4455,4 @@ _curses_has_extended_color_support(PyObject *module,
PyObject *Py_UNUSED(ignored
#ifndef _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF
#define _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF
#endif /* !defined(_CURSES_ASSUME_DEFAULT_COLORS_METHODDEF) */
-/*[clinic end generated code: output=78252f8805206d95 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=131841f188342a3c input=a9049054013a1b77]*/
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]