Skip to content

[3.14] gh-156234: Fix and rewrite the curses documentation on reading (GH-156235) - #156280

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-156235-3.14
Aug 23, 2026
Merged

[3.14] gh-156234: Fix and rewrite the curses documentation on reading (GH-156235)#156280
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-156235-3.14

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 23, 2026

Copy link
Copy Markdown
Member

Manual backport of #156235.

Fix wrong types: instr() and getstr() return a bytes object, not a str, and their n limits the number of bytes; getkey() returns a str; unctrl() returns a bytes object. Make clear whether an integer standing for a character is an encoded byte or a character code.

Rewrite the documentation of getch(), get_wch(), getkey(), getstr() and instr(), following X/Open Curses.

The parts for in_wstr(), in_wchstr(), get_wstr(), wunctrl() and complexchar/complexstr are omitted: these do not exist in 3.14.

(cherry picked from commit be87bfa)

…eading (pythonGH-156235)

Fix wrong types: instr() and getstr() return a bytes object, not a str, and
their n limits the number of bytes; getkey() returns a str; unctrl() returns
a bytes object.  Make clear whether an integer standing for a character is an
encoded byte or a character code.

Rewrite the documentation of getch(), get_wch(), getkey(), getstr() and
instr(), following X/Open Curses.

(cherry picked from commit be87bfa)
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 23, 2026 12:12
@serhiy-storchaka
serhiy-storchaka merged commit 9b7eb47 into python:3.14 Aug 23, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 23, 2026
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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant