Skip to content

Add OrderedDict.fromkeys - #6485

Merged
Akuli merged 2 commits into
python:masterfrom
AlexWaygood:patch-3
Dec 3, 2021
Merged

Akuli merged 2 commits into
python:masterfrom
AlexWaygood:patch-3

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Closes #3800 (no other solution possible until we have higher-kinded TypeVars)

Closes python#3800 (no other solution possible until we have higher-kinded `TypeVar`s)
@Akuli

Akuli commented Dec 3, 2021

Copy link
Copy Markdown
Collaborator

It would be good to add a couple comments:

  • Keeping dict.fromkeys and OrderedDict.fromkeys in sync (a comment in both places). Otherwise when we fix one of them, we forget to fix the other.
  • Something like # TODO: actually inherited from dict, see #issuenumberhere

@AlexWaygood
AlexWaygood marked this pull request as draft December 3, 2021 17:57
@github-actions

This comment has been minimized.

@AlexWaygood
AlexWaygood marked this pull request as ready for review December 3, 2021 19:12
@AlexWaygood

Copy link
Copy Markdown
Member Author

It would be good to add a couple comments:

  • Keeping dict.fromkeys and OrderedDict.fromkeys in sync (a comment in both places). Otherwise when we fix one of them, we forget to fix the other.
  • Something like # TODO: actually inherited from dict, see #issuenumberhere

Done! I added some comments for some other collections methods with similar issues that I modified recently, as well.

@github-actions

github-actions Bot commented Dec 3, 2021

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@Akuli Akuli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@Akuli
Akuli merged commit a293f1e into python:master Dec 3, 2021
@AlexWaygood
AlexWaygood deleted the patch-3 branch December 3, 2021 20:33
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.

OrderedDict.fromkeys() returns Dict instead of OrderedDict

2 participants