Skip to content

gh-159301: Add missing symbolic constants to tkinter.constants - #159302

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-constants-missing
Open

serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-constants-missing

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Add constants for the Tk option values which had none, 39 names in total: values of the -labelanchor, -compound, -bordermode, -direction, -stretch, -tabstyle, -insertunfocussed, -mode, -selecttype, -show, -state, -validate and -type options, the names of the themed widget states, and PIXELS for scrolling the text widget.

All of them are documented in the Constants section. Three sets are not available in all supported Tk versions, which is noted there: HOLLOW requires Tk 8.6, ITEM and CELL require Tk 9.0, and LEAF and OPEN require Tk 9.1. All other names work with Tk 8.5.

tkinter.__all__ is computed from the module namespace, so the new names are exported from tkinter automatically.

Add constants for the Tk option values which had none: values of the
-labelanchor, -compound, -bordermode, -direction, -stretch, -tabstyle,
-insertunfocussed, -mode, -selecttype, -show, -state, -validate and
-type options, the names of the themed widget states, and PIXELS.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35113348 | 📁 Comparing 00fc1d7 against main (c04ad8c)

  🔍 Preview build  

3 files changed
± library/tkinter.html
± whatsnew/3.16.html
± whatsnew/changelog.html

@terryjreedy

Copy link
Copy Markdown
Member

The English looks good.

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Thank Claude 😋

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

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants