Author Jeffrey.Kintscher
Recipients Jeffrey.Kintscher
Date 2019-05-24.02:17:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558664275.97.0.0277464788177.issue36982@roundup.psfhosted.org>
In-reply-to
Content
A new function called curses.has_extended_color_support() will indicate whether the linked ncurses library provides extended color support. It returns true if curses.h defines NCURSES_EXT_COLORS and NCURSES_EXT_FUNCS, indicating that the extended color functions are available. This seems more useful to developers than using an indirect method like trying to set a color-pair greater than 0x7fff and checking for an exception to indicate lack of support.

At first glance, has_extended_color() seems like a better name because it is similar to has_colors(), but the two functions have very different semantics that could confuse developers. has_extended_color_support() indicates available functionality in the underlying ncurses library that is set when the interpreter is compiled and linked, while has_curses() indicates available functionality of the current terminal at run-time.
History
Date User Action Args
2019-05-24 02:17:55Jeffrey.Kintschersetrecipients: + Jeffrey.Kintscher
2019-05-24 02:17:55Jeffrey.Kintschersetmessageid: <1558664275.97.0.0277464788177.issue36982@roundup.psfhosted.org>
2019-05-24 02:17:55Jeffrey.Kintscherlinkissue36982 messages
2019-05-24 02:17:55Jeffrey.Kintschercreate