Skip to content

Commit f57b80c

Browse files
authored
[3.13] gh-151623: Improve curses documentation style (GH-151635) (#151638)
1 parent 8058308 commit f57b80c

2 files changed

Lines changed: 24 additions & 24 deletions

File tree

Doc/library/curses.panel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The module :mod:`curses.panel` defines the following functions:
4747

4848
.. _curses-panel-objects:
4949

50-
Panel Objects
50+
Panel objects
5151
-------------
5252

5353
Panel objects, as returned by :func:`new_panel` above, are windows with a

Doc/library/curses.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ The module :mod:`curses` defines the following functions:
227227

228228
.. function:: getwin(file)
229229

230-
Read window related data stored in the file by an earlier :meth:`window.putwin` call.
230+
Read window-related data stored in the file by an earlier :meth:`window.putwin` call.
231231
The routine then creates and initializes a new window using that data, returning
232232
the new window object. The *file* argument must be a file object opened for
233233
reading in binary mode.
@@ -241,7 +241,7 @@ The module :mod:`curses` defines the following functions:
241241

242242
Return ``True`` if the module supports extended colors; otherwise, return
243243
``False``. Extended color support allows more than 256 color pairs for
244-
terminals that support more than 16 colors (e.g. xterm-256color).
244+
terminals that support more than 16 colors (for example, xterm-256color).
245245

246246
Extended color support requires ncurses version 6.1 or later.
247247

@@ -391,7 +391,7 @@ The module :mod:`curses` defines the following functions:
391391
methods of a pad require 6 arguments to specify the part of the pad to be
392392
displayed and the location on the screen to be used for the display. The
393393
arguments are *pminrow*, *pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p*
394-
arguments refer to the upper left corner of the pad region to be displayed and
394+
arguments refer to the upper-left corner of the pad region to be displayed and
395395
the *s* arguments define a clipping box on the screen within which the pad region
396396
is to be displayed.
397397

@@ -628,7 +628,7 @@ The module :mod:`curses` defines the following functions:
628628
.. function:: tparm(str[, ...])
629629

630630
Instantiate the bytes object *str* with the supplied parameters, where *str* should
631-
be a parameterized string obtained from the terminfo database. E.g.
631+
be a parameterized string obtained from the terminfo database. For example,
632632
``tparm(tigetstr("cup"), 5, 3)`` could result in ``b'\033[6;4H'``, the exact
633633
result depending on terminal type. Up to nine integer parameters may be supplied.
634634

@@ -722,7 +722,7 @@ The module :mod:`curses` defines the following functions:
722722

723723
.. _curses-window-objects:
724724

725-
Window Objects
725+
Window objects
726726
--------------
727727

728728
.. class:: window
@@ -741,7 +741,7 @@ Window Objects
741741
.. note::
742742

743743
Writing outside the window, subwindow, or pad raises a :exc:`curses.error`.
744-
Attempting to write to the lower right corner of a window, subwindow,
744+
Attempting to write to the lower-right corner of a window, subwindow,
745745
or pad will cause an exception to be raised after the character is printed.
746746

747747

@@ -762,7 +762,7 @@ Window Objects
762762
.. note::
763763

764764
* Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
765-
Attempting to write to the lower right corner of a window, subwindow,
765+
Attempting to write to the lower-right corner of a window, subwindow,
766766
or pad will cause an exception to be raised after the string is printed.
767767

768768
* A `bug in ncurses <https://bugs.python.org/issue35924>`_, the backend
@@ -1223,10 +1223,10 @@ Window Objects
12231223

12241224
The 6 arguments can only be specified, and are then required, when the window
12251225
is a pad created with :func:`newpad`. The additional parameters are needed to indicate what part
1226-
of the pad and screen are involved. *pminrow* and *pmincol* specify the upper
1227-
left-hand corner of the rectangle to be displayed in the pad. *sminrow*,
1226+
of the pad and screen are involved. *pminrow* and *pmincol* specify the
1227+
upper-left corner of the rectangle to be displayed in the pad. *sminrow*,
12281228
*smincol*, *smaxrow*, and *smaxcol* specify the edges of the rectangle to be
1229-
displayed on the screen. The lower right-hand corner of the rectangle to be
1229+
displayed on the screen. The lower-right corner of the rectangle to be
12301230
displayed in the pad is calculated from the screen coordinates, since the
12311231
rectangles must be the same size. Both rectangles must be entirely contained
12321232
within their respective structures. Negative values of *pminrow*, *pmincol*,
@@ -1395,14 +1395,14 @@ The :mod:`curses` module defines the following data members:
13951395

13961396
.. data:: COLS
13971397

1398-
The width of the screen, i.e., the number of columns.
1398+
The width of the screen, that is, the number of columns.
13991399
It is defined only after the call to :func:`initscr`.
14001400
Updated by :func:`update_lines_cols`, :func:`resizeterm` and
14011401
:func:`resize_term`.
14021402

14031403
.. data:: LINES
14041404

1405-
The height of the screen, i.e., the number of lines.
1405+
The height of the screen, that is, the number of lines.
14061406
It is defined only after the call to :func:`initscr`.
14071407
Updated by :func:`update_lines_cols`, :func:`resizeterm` and
14081408
:func:`resize_term`.
@@ -1705,15 +1705,15 @@ falls back on a crude printable ASCII approximation.
17051705
+------------------------+------------------------------------------+
17061706
| ACS code | Meaning |
17071707
+========================+==========================================+
1708-
| .. data:: ACS_BBSS | alternate name for upper right corner |
1708+
| .. data:: ACS_BBSS | alternate name for upper-right corner |
17091709
+------------------------+------------------------------------------+
17101710
| .. data:: ACS_BLOCK | solid square block |
17111711
+------------------------+------------------------------------------+
17121712
| .. data:: ACS_BOARD | board of squares |
17131713
+------------------------+------------------------------------------+
17141714
| .. data:: ACS_BSBS | alternate name for horizontal line |
17151715
+------------------------+------------------------------------------+
1716-
| .. data:: ACS_BSSB | alternate name for upper left corner |
1716+
| .. data:: ACS_BSSB | alternate name for upper-left corner |
17171717
+------------------------+------------------------------------------+
17181718
| .. data:: ACS_BSSS | alternate name for top tee |
17191719
+------------------------+------------------------------------------+
@@ -1739,9 +1739,9 @@ falls back on a crude printable ASCII approximation.
17391739
+------------------------+------------------------------------------+
17401740
| .. data:: ACS_LEQUAL | less-than-or-equal-to |
17411741
+------------------------+------------------------------------------+
1742-
| .. data:: ACS_LLCORNER | lower left-hand corner |
1742+
| .. data:: ACS_LLCORNER | lower-left corner |
17431743
+------------------------+------------------------------------------+
1744-
| .. data:: ACS_LRCORNER | lower right-hand corner |
1744+
| .. data:: ACS_LRCORNER | lower-right corner |
17451745
+------------------------+------------------------------------------+
17461746
| .. data:: ACS_LTEE | left tee |
17471747
+------------------------+------------------------------------------+
@@ -1765,13 +1765,13 @@ falls back on a crude printable ASCII approximation.
17651765
+------------------------+------------------------------------------+
17661766
| .. data:: ACS_S9 | scan line 9 |
17671767
+------------------------+------------------------------------------+
1768-
| .. data:: ACS_SBBS | alternate name for lower right corner |
1768+
| .. data:: ACS_SBBS | alternate name for lower-right corner |
17691769
+------------------------+------------------------------------------+
17701770
| .. data:: ACS_SBSB | alternate name for vertical line |
17711771
+------------------------+------------------------------------------+
17721772
| .. data:: ACS_SBSS | alternate name for right tee |
17731773
+------------------------+------------------------------------------+
1774-
| .. data:: ACS_SSBB | alternate name for lower left corner |
1774+
| .. data:: ACS_SSBB | alternate name for lower-left corner |
17751775
+------------------------+------------------------------------------+
17761776
| .. data:: ACS_SSBS | alternate name for bottom tee |
17771777
+------------------------+------------------------------------------+
@@ -1785,9 +1785,9 @@ falls back on a crude printable ASCII approximation.
17851785
+------------------------+------------------------------------------+
17861786
| .. data:: ACS_UARROW | up arrow |
17871787
+------------------------+------------------------------------------+
1788-
| .. data:: ACS_ULCORNER | upper left corner |
1788+
| .. data:: ACS_ULCORNER | upper-left corner |
17891789
+------------------------+------------------------------------------+
1790-
| .. data:: ACS_URCORNER | upper right corner |
1790+
| .. data:: ACS_URCORNER | upper-right corner |
17911791
+------------------------+------------------------------------------+
17921792
| .. data:: ACS_VLINE | vertical line |
17931793
+------------------------+------------------------------------------+
@@ -1863,9 +1863,9 @@ The module :mod:`curses.textpad` defines the following function:
18631863

18641864
Draw a rectangle. The first argument must be a window object; the remaining
18651865
arguments are coordinates relative to that window. The second and third
1866-
arguments are the y and x coordinates of the upper left hand corner of the
1866+
arguments are the y and x coordinates of the upper-left corner of the
18671867
rectangle to be drawn; the fourth and fifth arguments are the y and x
1868-
coordinates of the lower right hand corner. The rectangle will be drawn using
1868+
coordinates of the lower-right corner. The rectangle will be drawn using
18691869
VT100/IBM PC forms characters on terminals that make this possible (including
18701870
xterm and most other software terminal emulators). Otherwise it will be drawn
18711871
with ASCII dashes, vertical bars, and plus signs.
@@ -1886,7 +1886,7 @@ You can instantiate a :class:`Textbox` object as follows:
18861886
be contained. If *insert_mode* is true, the textbox inserts typed
18871887
characters, shifting existing text to the right, rather than overwriting it.
18881888
The edit cursor of the textbox is initially located at the
1889-
upper left hand corner of the containing window, with coordinates ``(0, 0)``.
1889+
upper-left corner of the containing window, with coordinates ``(0, 0)``.
18901890
The instance's :attr:`stripspaces` flag is initially on.
18911891

18921892
:class:`Textbox` objects have the following methods:

0 commit comments

Comments
 (0)