Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-161054c-3.13
Sep 3, 2026
Merged

[3.13] gh-156347: Fix wrong statements in the curses documentation (GH-156354)#156874
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-161054c-3.13

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.13.

(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)
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting core review labels Sep 3, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Sep 3, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 6ad0c73 into python:3.13 Sep 3, 2026
31 of 32 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 3, 2026
@serhiy-storchaka
serhiy-storchaka deleted the backport-161054c-3.13 branch September 3, 2026 07:30
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.

1 participant