Skip to content

gh-156347: Fix wrong statements in the curses documentation - #156354

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-howto-fixes
Open

gh-156347: Fix wrong statements in the curses documentation#156354
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-howto-fixes

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

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(), mention complexchar and complexstr, and read whole characters in the examples.

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(), mention complexchar and complexstr,
and read whole characters in the examples.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34221737 | 📁 Comparing 147c463 against main (a728080)

  🔍 Preview build  

2 files changed
± howto/curses.html
± library/curses.html

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

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant