Skip to content

Simplify the implementation of typing.Annotated #105509

Closed

Description

@AlexWaygood

Feature or enhancement

typing.Annotated is currently implemented as a class, but doesn't need to be. All other objects like it in the typing module are implemented as instances of typing._SpecialForm, and we can do the same here. This simplifies the code a lot (making it easier to maintain in the future), and should also be slightly more performant.

Linked PRs

Activity

  1. self-assigned this
    on Jun 8, 2023
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    3.13only security fixes
    on Jun 8, 2023
  3. added a commit that references this issue on Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.13only security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions