Skip to content

PEP 827: Split whether a param has a default out from "quals"#4979

Merged
1st1 merged 3 commits into
python:mainfrom
msullivan:default
May 23, 2026
Merged

PEP 827: Split whether a param has a default out from "quals"#4979
1st1 merged 3 commits into
python:mainfrom
msullivan:default

Conversation

@msullivan
Copy link
Copy Markdown
Contributor

Q/.quals becomes K/.kind, and we add D/.default to track whether there
is a default. It should be the type of the default if it exists,
otherwise Never. Tracking the type here allows specifying a
Literal in order to track a specific value, similar to what we
support for Member.

There is a possible follow-up to use an enum for the ParamKind
instead of string literals but I'm not certain about it yet.

  • Change is either:
    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

Q/.quals becomes K/.kind, and we add D/.default to track whether there
is a default. It should be the type of the default if it exists,
otherwise `Never`. Tracking the type here allows specifying a
`Literal` in order to track a specific value, similar to what we
support for `Member`.

There is a possible follow-up to use an enum for the `ParamKind`
instead of string literals but I'm not certain about it yet.
@msullivan msullivan requested a review from 1st1 as a code owner May 20, 2026 17:26
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 20, 2026

Documentation build overview

📚 pep-previews | 🛠️ Build #32817588 | 📁 Comparing 554887a against latest (c1f8b92)

  🔍 Preview build  

703 files changed · ± 703 modified

± Modified

Comment thread peps/pep-0827.rst
Comment thread peps/pep-0827.rst Outdated
There is going to be a follow-up that makes all of these into enums.
For reasons I now regret I decided to split the change.
@1st1 1st1 enabled auto-merge (squash) May 23, 2026 00:29
@1st1 1st1 merged commit 8f21089 into python:main May 23, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants