Skip to content

Commit 7aa41c4

Browse files
[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
Fix errors and clarify the curses, curses.panel and curses.ascii docs against X/Open Curses and ncurses, and sync the affected docstrings. (cherry picked from commit 65afcdd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent e9c7cc1 commit 7aa41c4

8 files changed

Lines changed: 132 additions & 71 deletions

File tree

Doc/library/curses.ascii.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ C library:
114114

115115
.. function:: isblank(c)
116116

117-
Checks for an ASCII whitespace character; space or horizontal tab.
117+
Checks for an ASCII blank character; space or horizontal tab.
118118

119119

120120
.. function:: iscntrl(c)
@@ -168,7 +168,8 @@ C library:
168168

169169
.. function:: isctrl(c)
170170

171-
Checks for an ASCII control character (ordinal values 0 to 31).
171+
Checks for an ASCII control character (ordinal values 0 to 31). Unlike
172+
:func:`iscntrl`, this does not include the delete character (0x7f).
172173

173174

174175
.. function:: ismeta(c)

Doc/library/curses.panel.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ The module :mod:`!curses.panel` defines the following functions:
2626

2727
.. function:: new_panel(win)
2828

29-
Returns a panel object, associating it with the given window *win*. Be aware
29+
Returns a panel object, associating it with the given window *win* and
30+
placing the new panel on top of the panel stack. Be aware
3031
that you need to keep the returned panel object referenced explicitly. If you
3132
don't, the panel object is garbage collected and removed from the panel stack.
3233

@@ -99,7 +100,8 @@ Panel objects have the following methods:
99100

100101
.. method:: Panel.show()
101102

102-
Display the panel (which might have been hidden).
103+
Display the panel (which might have been hidden), placing it on top of
104+
the panel stack.
103105

104106

105107
.. method:: Panel.top()

0 commit comments

Comments
 (0)