Skip to content

Commit 34b4710

Browse files
brandtbucherJelleZijlstra
authored andcommitted
Slice attributes can be of any type. (#3024)
1 parent 4ae4714 commit 34b4710

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,13 @@ class bool(int):
841841
def __getnewargs__(self) -> Tuple[int]: ...
842842

843843
class slice(object):
844-
start: Optional[int]
845-
step: Optional[int]
846-
stop: Optional[int]
844+
start: Any
845+
step: Any
846+
stop: Any
847847
@overload
848-
def __init__(self, stop: Optional[int]) -> None: ...
848+
def __init__(self, stop: Any) -> None: ...
849849
@overload
850-
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ...
850+
def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ...
851851
def indices(self, len: int) -> Tuple[int, int, int]: ...
852852

853853
class tuple(Sequence[_T_co], Generic[_T_co]):

stdlib/2and3/builtins.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,13 @@ class bool(int):
841841
def __getnewargs__(self) -> Tuple[int]: ...
842842

843843
class slice(object):
844-
start: Optional[int]
845-
step: Optional[int]
846-
stop: Optional[int]
844+
start: Any
845+
step: Any
846+
stop: Any
847847
@overload
848-
def __init__(self, stop: Optional[int]) -> None: ...
848+
def __init__(self, stop: Any) -> None: ...
849849
@overload
850-
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ...
850+
def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ...
851851
def indices(self, len: int) -> Tuple[int, int, int]: ...
852852

853853
class tuple(Sequence[_T_co], Generic[_T_co]):

0 commit comments

Comments
 (0)