Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions stdlib/builtins.pyi
Original file line numberDiff line numberDiff line change
Expand Up@@ -929,6 +929,9 @@ class slice:
__hash__: ClassVar[None] # type: ignore[assignment]
def indices(self, len: SupportsIndex, /) -> tuple[int, int, int]: ...

class _GetItemIterable(Protocol[_T_co]):
def __getitem__(self, i: int, /) -> _T_co: ...

class tuple(Sequence[_T_co]):
def __new__(cls, iterable: Iterable[_T_co] = ..., /) -> Self: ...
def __len__(self) -> int: ...
Expand DownExpand Up@@ -1188,7 +1191,7 @@ class frozenset(AbstractSet[_T_co]):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...

class enumerate(Iterator[tuple[int, _T]]):
def __new__(cls, iterable: Iterable[_T], start: int = ...) -> Self: ...
def __new__(cls, iterable: Iterable[_T] | _GetItemIterable[_T], start: int = ...) -> Self: ...
def __iter__(self) -> Self: ...
def __next__(self) -> tuple[int, _T]: ...
if sys.version_info >= (3, 9):
Expand DownExpand Up@@ -1417,10 +1420,6 @@ def help(request: object = ...) -> None: ...
def hex(number: int | SupportsIndex, /) -> str: ...
def id(obj: object, /) -> int: ...
def input(prompt: object = "", /) -> str: ...

class _GetItemIterable(Protocol[_T_co]):
def __getitem__(self, i: int, /) -> _T_co: ...

@overload
def iter(object: SupportsIter[_SupportsNextT], /) -> _SupportsNextT: ...
@overload
Expand Down