ssl, socket, array: Improve bytes handling (#8997)

This commit is contained in:
Jelle Zijlstra
2022-10-28 06:35:51 -07:00
committed by GitHub
parent bcd876f77e
commit 287fce4872
4 changed files with 53 additions and 38 deletions

View File

@@ -21,15 +21,19 @@ class array(MutableSequence[_T], Generic[_T]):
@property
def itemsize(self) -> int: ...
@overload
def __init__(self: array[int], __typecode: _IntTypeCode, __initializer: bytes | Iterable[int] = ...) -> None: ...
def __init__(self: array[int], __typecode: _IntTypeCode, __initializer: bytes | bytearray | Iterable[int] = ...) -> None: ...
@overload
def __init__(self: array[float], __typecode: _FloatTypeCode, __initializer: bytes | Iterable[float] = ...) -> None: ...
def __init__(
self: array[float], __typecode: _FloatTypeCode, __initializer: bytes | bytearray | Iterable[float] = ...
) -> None: ...
@overload
def __init__(self: array[str], __typecode: _UnicodeTypeCode, __initializer: bytes | Iterable[str] = ...) -> None: ...
def __init__(
self: array[str], __typecode: _UnicodeTypeCode, __initializer: bytes | bytearray | Iterable[str] = ...
) -> None: ...
@overload
def __init__(self, __typecode: str, __initializer: Iterable[_T]) -> None: ...
@overload
def __init__(self, __typecode: str, __initializer: bytes = ...) -> None: ...
def __init__(self, __typecode: str, __initializer: bytes | bytearray = ...) -> None: ...
def append(self, __v: _T) -> None: ...
def buffer_info(self) -> tuple[int, int]: ...
def byteswap(self) -> None: ...