Skip to content

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

Merged
hugovk merged 1 commit into
python:3.15from
serhiy-storchaka:backport-156235-3.15
Aug 27, 2026
Merged

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

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

(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)
@read-the-docs-community

Copy link
Copy Markdown

@hugovk
hugovk merged commit 6a9dbff into python:3.15 Aug 27, 2026
60 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 27, 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.

2 participants