Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cdce8p opened this issue Sep 27, 2022 · 3 comments · Fixed by #77
Closed

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

cdce8p opened this issue Sep 27, 2022 · 3 comments · Fixed by #77

Comments

@cdce8p
Copy link
Contributor

cdce8p commented Sep 27, 2022

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

@JelleZijlstra
Copy link
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.

@Gobot1234
Copy link
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 :)

@cdce8p
Copy link
Contributor Author

cdce8p commented Oct 2, 2022

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants