Skip to content

gh-87881: Document the result of curses inch() and getbkgd()#152488

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-inch-doc
Jun 28, 2026
Merged

gh-87881: Document the result of curses inch() and getbkgd()#152488
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-inch-doc

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

The documentation for :meth:curses.window.inch and :meth:curses.window.getbkgd described what they return but not how to use the packed value.

Document the character/attribute bit layout and how to extract the parts -- the A_CHARTEXT and A_ATTRIBUTES bit-masks and :func:~curses.pair_number for the color pair -- or :meth:~curses.window.in_wch to get a :class:~curses.complexchar with them already separated.

🤖 Generated with Claude Code

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair),
or use in_wch() to get a complexchar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33343349 | 📁 Comparing f264f50 against main (499d31f)

  🔍 Preview build  

1 file changed
± library/curses.html

@serhiy-storchaka serhiy-storchaka merged commit d831a69 into python:main Jun 28, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 28, 2026
@serhiy-storchaka serhiy-storchaka deleted the curses-inch-doc branch June 28, 2026 14:03
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 28, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d831a690766e92b3be5e40134f64407bd041bcbf 3.15

@bedevere-app

bedevere-app Bot commented Jun 28, 2026

Copy link
Copy Markdown

GH-152511 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 28, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 28, 2026
…H-152488) (GH-152511)

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair).
(cherry picked from commit d831a69)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jun 28, 2026
…H-152488) (GH-152511) (GH-152514)

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair).
(cherry picked from commit d831a69)
(cherry picked from commit 0901331)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jun 28, 2026
…H-152488) (GH-152511) (GH-152515)

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair).
(cherry picked from commit d831a69)
(cherry picked from commit 0901331)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant