Skip to content

Conversation

@davidfstr
Copy link
Contributor

Supports pending PR python/mypy#2206 .

T = TypeVar('T')


def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...
Copy link
Member

Choose a reason for hiding this comment

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

Hm, I thought the design for TypeDict allowed it to be used with keyword args?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not supported in the current implementation so far, but yes it's in the design.

I have a line item pending to discuss some forward compatibility concerns with keyword args (**kwfields) before actually implementing it.

@gvanrossum
Copy link
Member

gvanrossum commented Oct 16, 2016 via email

@gvanrossum gvanrossum changed the title Add mypy_extensions. [discussing] Add mypy_extensions. Oct 17, 2016
@gvanrossum gvanrossum merged commit 5c4300a into python:master Oct 17, 2016
@gvanrossum gvanrossum changed the title [discussing] Add mypy_extensions. Add mypy_extensions. Oct 17, 2016
@gvanrossum
Copy link
Member

Actually it's better to merge this before merging python/mypy#2206, so I've done that now.

hswong3i pushed a commit to alvistack/python-typeshed that referenced this pull request Jun 4, 2025
Refer to python/cpython#133961

I copied the tests from Python 3.14. Two don't pass but could probably be
made to pass by backporting more of annotationlib, but that's more than
I think we should do now.

Fixes python#608
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.

2 participants