Skip to content

gh-156234: Fix and rewrite the curses documentation on reading - #156235

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-instr-doc
Open

gh-156234: Fix and rewrite the curses documentation on reading#156235
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-instr-doc

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

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(), get_wstr(), instr(), in_wstr() and in_wchstr(), following X/Open Curses.

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(),
get_wstr(), instr(), in_wstr() and in_wchstr(), following X/Open Curses.
@serhiy-storchaka serhiy-storchaka added the docs Documentation in the Doc dir label Aug 22, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Aug 22, 2026
@serhiy-storchaka serhiy-storchaka added needs backport to 3.15 pre-release feature fixes, bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.13 bugs and security fixes labels Aug 22, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34186557 | 📁 Comparing 2aeb57f against main (f74cdf8)

  🔍 Preview build  

1 file changed
± library/curses.html

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 needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant