Skip to content

Initial runtime support for PEP 696 (TypeVarLike defaults) #75

Closed

Description

@cdce8p

I would like to start adding runtime support for PEP 696 . If the default parameter is added to TypeVar, ParamSpec, and TypeVarTuple, type checkers could start adding provisional support.

As I understand it, there exists a reference implementation for mypy already. It would be awesome, if we could start using that even before the PEP is formally accepted. With the 0.981 release for example, mypy added support for PEP 692 although it hasn't been approved yet.

Before I start working on it, would a PR be accepted?

/CC: @Gobot1234

Activity

  1. JelleZijlstra commented on Sep 27, 2022

    @JelleZijlstra
    Member

    Yes, we'll accept support for PEP 696 in typing-extensions, as we generally accept implementations of PEPs that have been assigned a number.

  2. Gobot1234 commented on Sep 27, 2022

    @Gobot1234
    Contributor

    Not that it should be that important at runtime but there is currently a PR open that should be treated as the most up to date version of PEP 696 https://pep-previews--2777.org.readthedocs.build/pep-0696. Thanks for taking this on BTW :)

  3. cdce8p commented on Oct 2, 2022

    @cdce8p
    ContributorAuthor

    I've opened #77 with initial support for the default parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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