Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Dec 13, 2024

  • Specify that extra_items and closed are also supported with the
    functional syntax.
  • Rewrite the rules for closed=True and inheritance. I attempted
    to make closed=True exactly equivalent to extra_items=Never in
    terms of inheritance. The semantics as specified in the previous
    version of the PEP felt harder to understand and less consistent.
  • Fix some incorrect comments regarding expected type checker errors.
  • Clarify section on assignability with Mapping
  • Add section on runtime behavior. I tried to make the intended runtime
    behavior simple to implement and understand. This makes the runtime
    simpler but may make life more complicated for tools consuming the
    metadata.
  • Clean up trailing whitespace

This grew out of work on python/typing-extensions#519. cc @PIG208


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

- Specify that extra_items and closed are also supported with the
  functional syntax.
- Rewrite the rules for `closed=True` and inheritance. I attempted
  to make `closed=True` exactly equivalent to `extra_items=Never` in
  terms of inheritance. The semantics as specified in the previous
  version of the PEP felt harder to understand and less consistent.
- Fix some incorrect comments regarding expected type checker errors.
- Clarify section on assignability with Mapping
- Add section on runtime behavior. I tried to make the intended runtime
  behavior simple to implement and understand. This makes the runtime
  simpler but may make life more complicated for tools consuming the
  metadata.
Copy link
Contributor

@PIG208 PIG208 left a comment

Choose a reason for hiding this comment

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

Thanks for the update! Just have one comment on this.

@JelleZijlstra JelleZijlstra enabled auto-merge (squash) December 20, 2024 00:12
@JelleZijlstra JelleZijlstra merged commit 484c43d into python:main Dec 20, 2024
4 of 5 checks passed
@JelleZijlstra JelleZijlstra deleted the pep728-runtime branch December 20, 2024 00:14
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