mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
range and slice: start, stop, step are read-only (#6849)
This commit is contained in:
@@ -734,9 +734,12 @@ class bool(int):
|
||||
|
||||
@final
|
||||
class slice:
|
||||
start: Any
|
||||
step: Any
|
||||
stop: Any
|
||||
@property
|
||||
def start(self) -> Any: ...
|
||||
@property
|
||||
def step(self) -> Any: ...
|
||||
@property
|
||||
def stop(self) -> Any: ...
|
||||
@overload
|
||||
def __init__(self, __stop: Any) -> None: ...
|
||||
@overload
|
||||
@@ -945,9 +948,12 @@ class enumerate(Iterator[tuple[int, _T]], Generic[_T]):
|
||||
|
||||
@final
|
||||
class range(Sequence[int]):
|
||||
start: int
|
||||
stop: int
|
||||
step: int
|
||||
@property
|
||||
def start(self) -> int: ...
|
||||
@property
|
||||
def stop(self) -> int: ...
|
||||
@property
|
||||
def step(self) -> int: ...
|
||||
@overload
|
||||
def __init__(self, __stop: SupportsIndex) -> None: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user