Skip to content

Commit 04521c2

Browse files
authored
bpo-30176: Add missing curses cell attributes constants (#2277)
1 parent 46e299c commit 04521c2

File tree

2 files changed

+47
-9
lines changed

2 files changed

+47
-9
lines changed

Doc/library/curses.rst

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,27 +1271,63 @@ The :mod:`curses` module defines the following data members:
12711271
A string representing the current version of the module. Also available as
12721272
:const:`__version__`.
12731273

1274-
Several constants are available to specify character cell attributes:
1274+
Some constants are available to specify character cell attributes.
1275+
The exact constants available are system dependent.
12751276

12761277
+------------------+-------------------------------+
12771278
| Attribute | Meaning |
12781279
+==================+===============================+
1279-
| ``A_ALTCHARSET`` | Alternate character set mode. |
1280+
| ``A_ALTCHARSET`` | Alternate character set mode |
12801281
+------------------+-------------------------------+
1281-
| ``A_BLINK`` | Blink mode. |
1282+
| ``A_BLINK`` | Blink mode |
12821283
+------------------+-------------------------------+
1283-
| ``A_BOLD`` | Bold mode. |
1284+
| ``A_BOLD`` | Bold mode |
12841285
+------------------+-------------------------------+
1285-
| ``A_DIM`` | Dim mode. |
1286+
| ``A_DIM`` | Dim mode |
12861287
+------------------+-------------------------------+
1287-
| ``A_NORMAL`` | Normal attribute. |
1288+
| ``A_INVIS`` | Invisible or blank mode |
1289+
+------------------+-------------------------------+
1290+
| ``A_NORMAL`` | Normal attribute |
1291+
+------------------+-------------------------------+
1292+
| ``A_PROTECT`` | Protected mode |
12881293
+------------------+-------------------------------+
12891294
| ``A_REVERSE`` | Reverse background and |
1290-
| | foreground colors. |
1295+
| | foreground colors |
1296+
+------------------+-------------------------------+
1297+
| ``A_STANDOUT`` | Standout mode |
1298+
+------------------+-------------------------------+
1299+
| ``A_UNDERLINE`` | Underline mode |
1300+
+------------------+-------------------------------+
1301+
| ``A_HORIZONTAL`` | Horizontal highlight |
1302+
+------------------+-------------------------------+
1303+
| ``A_LEFT`` | Left highlight |
1304+
+------------------+-------------------------------+
1305+
| ``A_LOW`` | Low highlight |
1306+
+------------------+-------------------------------+
1307+
| ``A_RIGHT`` | Right highlight |
1308+
+------------------+-------------------------------+
1309+
| ``A_TOP`` | Top highlight |
1310+
+------------------+-------------------------------+
1311+
| ``A_VERTICAL`` | Vertical highlight |
1312+
+------------------+-------------------------------+
1313+
| ``A_CHARTEXT`` | Bit-mask to extract a |
1314+
| | character |
1315+
+------------------+-------------------------------+
1316+
1317+
Several constants are available to extract corresponding attributes returned
1318+
by some methods.
1319+
1320+
+------------------+-------------------------------+
1321+
| Bit-mask | Meaning |
1322+
+==================+===============================+
1323+
| ``A_ATTRIBUTES`` | Bit-mask to extract |
1324+
| | attributes |
12911325
+------------------+-------------------------------+
1292-
| ``A_STANDOUT`` | Standout mode. |
1326+
| ``A_CHARTEXT`` | Bit-mask to extract a |
1327+
| | character |
12931328
+------------------+-------------------------------+
1294-
| ``A_UNDERLINE`` | Underline mode. |
1329+
| ``A_COLOR`` | Bit-mask to extract |
1330+
| | color-pair field information |
12951331
+------------------+-------------------------------+
12961332

12971333
Keys are referred to by integer constants with names starting with ``KEY_``.

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ C API
270270
Documentation
271271
-------------
272272

273+
- bpo-30176: Add missing attribute related constants in curses documentation.
274+
273275
- bpo-26985: Add missing info of code object in inspect documentation.
274276

275277
- bpo-28929: Link the documentation to its source file on GitHub.

0 commit comments

Comments
 (0)