Skip to content

Commit

Permalink
Add tuple key type for memoryview.__getitem__ and __setitem__ (#11296)
Browse files Browse the repository at this point in the history
  • Loading branch information
posthumz authored Jan 21, 2024
1 parent 02e19d6 commit 2168ab5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ class memoryview(Sequence[int]):
) -> None: ...
def cast(self, format: str, shape: list[int] | tuple[int, ...] = ...) -> memoryview: ...
@overload
def __getitem__(self, __key: SupportsIndex) -> int: ...
def __getitem__(self, __key: SupportsIndex | tuple[SupportsIndex, ...]) -> int: ...
@overload
def __getitem__(self, __key: slice) -> memoryview: ...
def __contains__(self, __x: object) -> bool: ...
Expand All @@ -855,7 +855,7 @@ class memoryview(Sequence[int]):
@overload
def __setitem__(self, __key: slice, __value: ReadableBuffer) -> None: ...
@overload
def __setitem__(self, __key: SupportsIndex, __value: SupportsIndex) -> None: ...
def __setitem__(self, __key: SupportsIndex | tuple[SupportsIndex, ...], __value: SupportsIndex) -> None: ...
if sys.version_info >= (3, 10):
def tobytes(self, order: Literal["C", "F", "A"] | None = "C") -> bytes: ...
else:
Expand Down

0 comments on commit 2168ab5

Please sign in to comment.