mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-15 02:31:09 +08:00
range and slice: start, stop, step are read-only (#6849)
This commit is contained in:
1 parent
e77a66aced
commit
9558b36a45
1 file changed
+12
-6
+12
-6
@@ -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