Skip to content

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

Merged
hugovk merged 1 commit into
python:3.15from
serhiy-storchaka:backport-161054c-3.15
Sep 5, 2026
Merged

hugovk merged 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

@hugovk
hugovk merged commit 996300c into python:3.15 Sep 5, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 5, 2026
@serhiy-storchaka
serhiy-storchaka deleted the backport-161054c-3.15 branch November 25, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news topic-curses

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants