Skip to content

Add TypeAlias for OrderedDict - #518

Closed
elazarg wants to merge 2 commits into
python:masterfrom
elazarg:master
Closed

elazarg wants to merge 2 commits into
python:masterfrom
elazarg:master

Conversation

@elazarg

@elazarg elazarg commented Sep 1, 2016

Copy link
Copy Markdown
Contributor

This is needed for NamedTuple support in mypy

@JukkaL

JukkaL commented Sep 1, 2016

Copy link
Copy Markdown
Contributor

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

elazarg commented Sep 1, 2016

Copy link
Copy Markdown
Contributor Author

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

@JukkaL

JukkaL commented Sep 1, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

3 participants