Skip to content

Add clear and copy methods to MutableSequence in Python 3 #1765

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 2 commits into from
Dec 16, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/3/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ class MutableSequence(Sequence[_T], Generic[_T]):
def __delitem__(self, i: slice) -> None: ...
# Mixin methods
def append(self, object: _T) -> None: ...
def clear(self) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I'd be inclined to follow the implementation rather than the documentation here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

def copy(self) -> MutableSequence[_T]: ...
def extend(self, iterable: Iterable[_T]) -> None: ...
def reverse(self) -> None: ...
def pop(self, index: int = ...) -> _T: ...
Expand Down