Skip to content

builtins: improve bytes handling #9027

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 31, 2022
Merged
Changes from all commits
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
12 changes: 6 additions & 6 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ class bytes(ByteString):
def __rmul__(self, __n: SupportsIndex) -> bytes: ...
def __mod__(self, __value: Any) -> bytes: ...
# Incompatible with Sequence.__contains__
def __contains__(self, __o: SupportsIndex | bytes) -> bool: ... # type: ignore[override]
def __contains__(self, __o: SupportsIndex | ReadableBuffer) -> bool: ... # type: ignore[override]
def __eq__(self, __x: object) -> bool: ...
def __ne__(self, __x: object) -> bool: ...
def __lt__(self, __x: bytes) -> bool: ...
Expand Down Expand Up @@ -798,10 +798,10 @@ class bytearray(MutableSequence[int], ByteString):
def __contains__(self, __o: SupportsIndex | ReadableBuffer) -> bool: ... # type: ignore[override]
def __eq__(self, __x: object) -> bool: ...
def __ne__(self, __x: object) -> bool: ...
def __lt__(self, __x: bytes) -> bool: ...
def __le__(self, __x: bytes) -> bool: ...
def __gt__(self, __x: bytes) -> bool: ...
def __ge__(self, __x: bytes) -> bool: ...
def __lt__(self, __x: ReadableBuffer) -> bool: ...
def __le__(self, __x: ReadableBuffer) -> bool: ...
def __gt__(self, __x: ReadableBuffer) -> bool: ...
def __ge__(self, __x: ReadableBuffer) -> bool: ...
def __alloc__(self) -> int: ...

@final
Expand All @@ -821,7 +821,7 @@ class memoryview(Sequence[int]):
@property
def ndim(self) -> int: ...
@property
def obj(self) -> bytes | bytearray: ...
def obj(self) -> ReadableBuffer: ...
@property
def c_contiguous(self) -> bool: ...
@property
Expand Down