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 #33514951 | 📁 Comparing b644885 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 2 times, most recently from 1a2f73f to 5fec4a9 Compare July 9, 2026 06:12
@till-varoquaux till-varoquaux force-pushed the feature/pep-835-update branch from 5fec4a9 to b644885 Compare July 9, 2026 14:00
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.

1 participant