diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index e538d7f22..2d8da1561 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -463,11 +463,14 @@ class bytearray(MutableSequence[int]): class bool(int, SupportsInt, SupportsFloat): def __init__(self, o: object = ...) -> None: ... -class slice: - start = 0 - step = 0 - stop = 0 - def __init__(self, start: int, stop: int = 0, step: int = 0) -> None: ... +class slice(object): + start = ... # type: Optional[int] + step = ... # type: Optional[int] + stop = ... # type: Optional[int] + @overload + def __init__(self, stop: int = None) -> None: ... + @overload + def __init__(self, start: int = None, stop: int = None, step: int = None) -> None: ... class tuple(Sequence[_T_co], Generic[_T_co]): def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 7ccb5959a..2c1200dfa 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -481,10 +481,13 @@ class bool(int, SupportsInt, SupportsFloat): def __init__(self, o: object = ...) -> None: ... class slice: - start = 0 - step = 0 - stop = 0 - def __init__(self, start: Optional[int], stop: Optional[int] = 0, step: Optional[int] = 0) -> None: ... + start = ... # type: Optional[int] + step = ... # type: Optional[int] + stop = ... # type: Optional[int] + @overload + def __init__(self, stop: int = None) -> None: ... + @overload + def __init__(self, start: int = None, stop: int = None, step: int = None) -> None: ... class tuple(Sequence[_T_co], Generic[_T_co]): def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...