Skip to content

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

Open
till-varoquaux wants to merge 1 commit 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 1 commit 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

Copy link
Copy Markdown

Documentation build overview

📚 pep-previews | 🛠️ Build #33501432 | 📁 Comparing 9dea6b3 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.

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