Skip to content

typeshed: declare that ordereddict's copy returns ordereddict #1656

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

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

SurenNihalani
Copy link
Contributor

Trying to fix #1642

@@ -96,6 +96,7 @@ class Counter(Dict[_T, int], Generic[_T]):
class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
def __reversed__(self) -> Iterator[_KT]: ...
def __copy__(self) -> "OrderedDict[_KT, _VT]": ...
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to quote things in typeshed.

@JelleZijlstra JelleZijlstra merged commit 8982999 into python:master Oct 9, 2017
@JelleZijlstra
Copy link
Member

Thanks for your contribution!

ilevkivskyi pushed a commit that referenced this pull request Feb 9, 2018
Solves issue #1642. A previous attempt at this, #1656,
added __copy__ but omitted copy, and it did not properly use self-type.
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.copy() returns an OrderedDict
2 participants