add bytearray.copy to Python 3 (#2133)

Fixes #1715.

2.7's bytearray doesn't have it.
This commit is contained in:
Jelle Zijlstra
2018-05-15 14:33:24 -04:00
committed by Guido van Rossum
parent db9246b3e5
commit 537b97ed39

View File

@@ -429,6 +429,7 @@ class bytearray(MutableSequence[int], ByteString):
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
else:
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
def copy(self) -> bytearray: ...
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
def endswith(self, suffix: bytes) -> bool: ...
def expandtabs(self, tabsize: int = ...) -> bytearray: ...