JelleZijlstra · GitHub

def __new__(cls: type[Self], __x: str | bytes | SupportsInt | SupportsIndex | SupportsTrunc = ...) -> Self: ...
def __new__(cls: type[Self], __x: str | ReadableBuffer | SupportsInt | SupportsIndex | SupportsTrunc = ...) -> Self: ...
@overload
def __new__(cls: type[Self], __x: str | bytes | bytearray, base: SupportsIndex) -> Self: ...
def from_bytes(
cls: type[Self],
bytes: Iterable[SupportsIndex] | SupportsBytes, # TODO buffer object argument
bytes: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer,
self, __sub: ReadableBuffer | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
) -> int: ...
if sys.version_info >= (3, 8):
def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str: ...
@overload
def __getitem__(self, __s: slice) -> bytes: ...
def __add__(self, __s: bytes) -> bytes: ...
def __add__(self, __s: ReadableBuffer) -> bytes: ...
def __setitem__(self, __s: slice, __x: Iterable[SupportsIndex] | bytes) -> None: ...
def __delitem__(self, __i: SupportsIndex | slice) -> None: ...
def __add__(self, __s: bytes) -> bytearray: ...
def __iadd__(self: Self, __s: Iterable[int]) -> Self: ...
opener: _Opener | None = ...,
) -> IO[Any]: ...
def ord(__c: str | bytes) -> int: ...
def ord(__c: str | bytes | bytearray) -> int: ...

Read the original on github.com ↗