Skip to content

Spec change: explicitly permit (statically known) conditional fields in TypedDict and NamedTuple #58

@carljm

Description

@carljm

Please consider the change to explicitly permit fields of TypedDict or NamedTuple to be conditional based on Python version and similar statically-known conditions.

Discuss thread, with agreement from everyone who commented: https://discuss.python.org/t/allowing-typeddict-items-to-be-defined-conditionally-via-statically-known-conditions/102973
Spec / conformance suite PR: python/typing#2263

  • Carl
  • Dave
  • Jelle
  • Jukka
  • Rebecca

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions