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

Add TypeAlias for OrderedDict #518

Closed
wants to merge 2 commits into from
Closed

Conversation

elazarg
Copy link
Contributor

@elazarg elazarg commented Sep 1, 2016

This is needed for NamedTuple support in mypy

@JukkaL
Copy link
Contributor

JukkaL commented Sep 1, 2016

Hmm, I don't think that this is required. If we want to use OrderedDict, it should be possible to use it via collections. I'd rather not have things in typing stubs that aren't present in the implementation.

@elazarg
Copy link
Contributor Author

elazarg commented Sep 1, 2016

So add the same TypeAlias there, or use plain ordereddict? This is somewhat confusing.
What's the difference between OrderedDict and DefaultDict?

@JukkaL
Copy link
Contributor

JukkaL commented Sep 1, 2016

collections only seems to have OrderedDict, I can't see ordereddict. Type aliases don't help here -- you need to refer to the real class definition, not an alias. Aliases are resolved elsewhere.

@gvanrossum
Copy link
Member

You no longer need this right?

@gvanrossum gvanrossum closed this Sep 2, 2016
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.

None yet

3 participants