zip.__iter__ and reversed.__iter__ return self (#7123)

This commit is contained in:
Jelle Zijlstra
2022-02-05 05:53:29 -08:00
committed by GitHub
parent 7179fee2d8
commit c1e3be1248

View File

@@ -1412,7 +1412,7 @@ class reversed(Iterator[_T], Generic[_T]):
def __init__(self, __sequence: Reversible[_T]) -> None: ...
@overload
def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ...
def __iter__(self) -> Iterator[_T]: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T: ...
def repr(__obj: object) -> str: ...
@@ -1524,7 +1524,7 @@ class zip(Iterator[_T_co], Generic[_T_co]):
*iterables: Iterable[Any],
) -> zip[tuple[Any, ...]]: ...
def __iter__(self) -> Iterator[_T_co]: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T_co: ...
# Signature of `builtins.__import__` should be kept identical to `importlib.__import__`