Skip to content

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

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

[3.15] gh-156234: Fix and rewrite the curses documentation on reading (GH-156235)#156279
serhiy-storchaka wants to merge 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

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

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant