mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
slice is hashable starting with Python 3.12 (#12832)
This commit is contained in:
@@ -948,7 +948,10 @@ class slice:
|
||||
@overload
|
||||
def __new__(cls, start: Any, stop: Any, step: Any = ..., /) -> Self: ...
|
||||
def __eq__(self, value: object, /) -> bool: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
if sys.version_info >= (3, 12):
|
||||
def __hash__(self) -> int: ...
|
||||
else:
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def indices(self, len: SupportsIndex, /) -> tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co]):
|
||||
|
||||
Reference in New Issue
Block a user