Skip to content

PEP 747: Explicitly define "valid type expression". #4484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025

Conversation

rchen152
Copy link
Contributor

@rchen152 rchen152 commented Jul 6, 2025

When I was reading the PEP, it was unclear to me whether the rule on what expressions can implicitly evaluate to TypeForm applied to the rest of the PEP. This PR suggests pulling that rule out into its own section and linking to it the first time "valid type expression" is used, to make it clear that this definition applies throughout.

  • 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)

📚 Documentation preview 📚: https://pep-previews--4484.org.readthedocs.build/

When I was reading the PEP, it was unclear to me whether the rule on what
expressions can implicitly evaluate to TypeForm applied to the rest of the
PEP. This PR suggests pulling that rule out into its own section and linking
to it the first time "valid type expression" is used, to make it clear that
this definition applies throughout.
@rchen152 rchen152 requested a review from JelleZijlstra as a code owner July 6, 2025 22:49
@hugovk
Copy link
Member

hugovk commented Jul 14, 2025

Ready to merge?

@rchen152
Copy link
Contributor Author

cc @davidfstr @erictraut (just realized that I never notified the authors of PEP 747 of this PR, oops!)

Copy link
Contributor

@erictraut erictraut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rchen152. The proposed change looks good to me.

@davidfstr
Copy link
Contributor

Also looks good to me 👍

(And hi, I'm alive. I'm still trying to find enough cycles to push the last mypy+TypeForm PR through. This upcoming weekend will be the first in 4 weeks when I don't have high priority commitments. Fingers-crossed I can get it moved forward then.)

@JelleZijlstra JelleZijlstra merged commit 60f0e69 into python:main Jul 22, 2025
5 checks passed
@rchen152 rchen152 deleted the p747 branch July 22, 2025 01:48
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.

5 participants