The docs say complexchar stores the color pair separately and without the color_pair() limit, but on a wide build attr carries the packed pair and saturates at 255:
>>> curses.complexchar("A", curses.A_BOLD, 1).attr == curses.A_BOLD False >>> hex(curses.complexchar("A", 0, 300).attr), curses.complexchar("A", 0, 300).pair ('0xff00', 300) >>> hex(curses.complexchar("A", 0, 1000).attr)
curses_cell_attr_pair() returns getcchar()'s attrs, which include A_COLOR. Its narrow branch already masks that out, as GH-154703 did for inch().
complexchar is new in 3.16, so no released version is affected.
CPython main branch
Linux
gh-154840: Keep the color pair out of curses complexchar.attr (GH-154841
pythongh-154840: Keep the color pair out of curses complexchar.attr (p…
Activity
gh-154840: Keep the color pair out of curses complexchar.attr (GH-154841
pythongh-154840: Keep the color pair out of curses complexchar.attr (p…