Skip to content

[3.15] gh-156347: Fix wrong statements in the curses documentation (GH-156354) - #156872

Open
serhiy-storchaka wants to merge 1 commit into
python:3.15from
serhiy-storchaka:backport-161054c-3.15
Open

[3.15] gh-156347: Fix wrong statements in the curses documentation (GH-156354)#156872
serhiy-storchaka wants to merge 1 commit into
python:3.15from
serhiy-storchaka:backport-161054c-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 3, 2026

Copy link
Copy Markdown
Member

Manual backport of #156354.

window.encoding does not encode the string arguments on a build with wide-character support: the curses library converts the characters itself.

In the HOWTO: getch() returns -1, not curses.ERR, when there is no input, and half-delay mode does the same as no-delay mode. getkey() returns the key name only for a special key. leaveok() is not a synonym for curs_set(). getstr() returns a bytes object, interprets the erase and kill characters, and limits bytes. The ACS_* constants are not all larger than 255. Also document get_wch() before getch(), and read whole characters in the example.

The mentions of complexchar, complexstr, in_wch(), in_wchstr() and get_wstr() are omitted: these do not exist in 3.15.

(cherry picked from commit 161054c)

…ion (pythonGH-156354)

window.encoding does not encode the string arguments on a build with
wide-character support: the curses library converts the characters itself.

In the HOWTO: getch() returns -1, not curses.ERR, when there is no input,
and half-delay mode does the same as no-delay mode.  getkey() returns the
key name only for a special key.  leaveok() is not a synonym for curs_set().
getstr() returns a bytes object, interprets the erase and kill characters,
and limits bytes.  The ACS_* constants are not all larger than 255.
Also document get_wch() before getch(), and read whole characters in the
example.

(cherry picked from commit 161054c)
@read-the-docs-community

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant