Skip to content

bpo-30101: Add support for curses.A_ITALIC. #1015

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 26, 2017
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
5 changes: 5 additions & 0 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,8 @@ Several constants are available to specify character cell attributes:
+------------------+-------------------------------+
| ``A_BOLD`` | Bold mode. |
+------------------+-------------------------------+
| ``A_ITALIC`` | Italic mode. |
+------------------+-------------------------------+
| ``A_DIM`` | Dim mode. |
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute. |
Expand All @@ -1294,6 +1296,9 @@ Several constants are available to specify character cell attributes:
| ``A_UNDERLINE`` | Underline mode. |
+------------------+-------------------------------+

.. versionadded:: 3.7
``A_ITALIC`` was added.

Keys are referred to by integer constants with names starting with ``KEY_``.
The exact keycaps available are system dependent.

Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ Koray Oner
Piet van Oostrum
Tomas Oppelstrup
Jason Orendorff
Bastien Orivel
Douglas Orr
William Orr
Michele Orrù
Expand Down
2 changes: 2 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ Extension Modules
Library
-------

- bpo-30101: Add support for curses.A_ITALIC.

- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch
by Nate Soares.

Expand Down
3 changes: 3 additions & 0 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3335,6 +3335,9 @@ PyInit__curses(void)
SetDictInt("A_BLINK", A_BLINK);
SetDictInt("A_DIM", A_DIM);
SetDictInt("A_BOLD", A_BOLD);
#ifdef A_ITALIC
SetDictInt("A_ITALIC", A_ITALIC);
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A_ITALIC is a ncurses extension, not X/Open standard. So I think it should be put after A_VERTICAL and prefixed with a line /* ncurses extension */.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't start to "document" constants here, it's not the right place.

SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
#if !defined(__NetBSD__)
SetDictInt("A_INVIS", A_INVIS);
Expand Down