Skip to content

PEP 835: Address Discourse feedback and align better with typing spec#5027

Open
till-varoquaux wants to merge 2 commits into
python:mainfrom
till-varoquaux:feature/pep-835-update
Open

PEP 835: Address Discourse feedback and align better with typing spec#5027
till-varoquaux wants to merge 2 commits into
python:mainfrom
till-varoquaux:feature/pep-835-update

Conversation

@till-varoquaux

@till-varoquaux till-varoquaux commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Key changes:

  • Structure & Formatting: Reordered all sections to strictly comply with the PEP 1 template. Added a mandatory "Security Implications" section.
  • Terminology & Spec Alignment: Consolidated terminology to provide clear definitions for the concepts used throughout the PEP (Type Expression, Type Metadata, Non-Typing Annotation, Symbol Decorator) and align better with the typing spec.
  • Forward References: Clarified that Format.TYPE supports None @Metadata structurally, eliminating the need to modify NoneType.__matmul__. Consequently, removed the "Supporting None" open issue.
  • Rejected Ideas: Expanded the section to include "Alternative Syntaxes" (e.g. <@, soft keywords, brackets), noting their rejection due to lack of consensus. Moved the __rmatmul__ rejection out of the Specification section.
  • Future Work: Added extensive examples of how the syntax might map to future Symbol Decorators, and added a JSR 308-inspired proposal for PEP 746 target-based constraints using intersection types (&).
  • 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)

Key changes:
- Structure & Formatting: Reordered all sections to strictly comply with the PEP 1 template. Added a mandatory "Security Implications" section.
- Terminology & Spec Alignment: Consolidated terminology to provide clear definitions for the concepts used throughout the PEP (Type Expression, Type Metadata, Non-Typing Annotation, Symbol Decorator) and align better with the typing spec.
- Forward References: Clarified that `Format.TYPE` supports `None @Metadata` structurally, eliminating the need to modify `NoneType.__matmul__`. Consequently, removed the "Supporting None" open issue.
- Rejected Ideas: Expanded the section to include "Alternative Syntaxes" (e.g. `<@`, soft keywords, brackets), noting their rejection due to lack of consensus. Moved the `__rmatmul__` rejection out of the Specification section.
- Future Work: Added extensive examples of how the syntax might map to future Symbol Decorators, and added a JSR 308-inspired proposal for PEP 746 target-based constraints using intersection types (`&`).
@read-the-docs-community

read-the-docs-community Bot commented Jul 8, 2026

Copy link
Copy Markdown

Documentation build overview

📚 pep-previews | 🛠️ Build #33535387 | 📁 Comparing a417416 against latest (218f944)

  🔍 Preview build  

2 files changed
± pep-0764/index.html
± pep-0835/index.html

@till-varoquaux

Copy link
Copy Markdown
Contributor Author

@JelleZijlstra thanks for the feedback. Removed __matmul__ on None , Format.TYPE in annotation lib is able to handle None @Annot without it.

@erictraut: I borrowed your process-of-elimination logic for the "Why the @ Operator?" section. Thank you so much.

@till-varoquaux till-varoquaux force-pushed the feature/pep-835-update branch 4 times, most recently from b644885 to 9ef1934 Compare July 10, 2026 03:57
@till-varoquaux till-varoquaux marked this pull request as draft July 10, 2026 14:34

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LG, thanks, I have few random comments.

Comment thread peps/pep-0835.rst Outdated
Comment thread peps/pep-0835.rst Outdated
Comment thread peps/pep-0835.rst Outdated
@till-varoquaux till-varoquaux force-pushed the feature/pep-835-update branch from 9ef1934 to b444c9e Compare July 10, 2026 17:07
@till-varoquaux till-varoquaux force-pushed the feature/pep-835-update branch from b444c9e to a417416 Compare July 10, 2026 17:57
@till-varoquaux till-varoquaux marked this pull request as ready for review July 10, 2026 20:08
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.

2 participants