Skip to content

gh-155499: Fix curses window.border() and window.box() with 0 - #155871

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-border-box-zero
Open

gh-155499: Fix curses window.border() and window.box() with 0#155871
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:curses-border-box-zero

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

The integer 0 asks for the default character, but it was rejected when passed together with a string character.

Now the drawing function is chosen by what the arguments need: only a complexchar cannot be drawn as a byte character, and a string character is narrowed when one is needed.

The defaults are also documented as 0 rather than as the ACS_* codes, which are not defined before initscr().

The integer 0 asks for the default character, but it was rejected when
passed together with a string character.  Choose the drawing function by
what the arguments need: only a complexchar cannot be drawn as a byte
character, and a string character is narrowed when one is needed.

Document the defaults as 0 rather than as the ACS_* codes, which are not
defined before initscr().
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34083670 | 📁 Comparing 1e20055 against main (1a52eae)

  🔍 Preview build  

2 files changed
± library/curses.html
± whatsnew/changelog.html

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant