Skip to content
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

TypedDict syntax variant with dict(...) argument #2739

Closed
davidfstr opened this issue Jan 22, 2017 · 3 comments
Closed

TypedDict syntax variant with dict(...) argument #2739

davidfstr opened this issue Jan 22, 2017 · 3 comments

Comments

@davidfstr
Copy link
Contributor

Support defining typed dicts like this:

Point = TypedDict('Point', dict(x=int, y=int))

The above syntax is similar to the syntax in #2492:

Point = TypedDict('Point', x=int, y=int)

Supporting this syntax for defining a TypedDict type is consistent with our existing support for a similar syntax for instantiating a TypedDict:

point = Point(dict(x=42, y=1337))
@davidfstr
Copy link
Contributor Author

FYI: I've started work on this.

@davidfstr
Copy link
Contributor Author

davidfstr commented Jun 11, 2017

FYI: I've started work on this.

Needless to say life has gotten busy on my end and I'm not expecting to resume work on this task in a reasonable timeframe.

I do have a partial patch that I started several months ago, but it may not be so useful since it is based on a very old version of the tree.

@97littleleaf11
Copy link
Collaborator

We wouldn't going to support this syntax and we encourage users to use the class-based syntax since it has been officially supported by Python.

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

No branches or pull requests

3 participants