Skip to content

Commit c1e3be1

Browse files
zip.__iter__ and reversed.__iter__ return self (#7123)
1 parent 7179fee commit c1e3be1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/builtins.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ class reversed(Iterator[_T], Generic[_T]):
14121412
def __init__(self, __sequence: Reversible[_T]) -> None: ...
14131413
@overload
14141414
def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ...
1415-
def __iter__(self) -> Iterator[_T]: ...
1415+
def __iter__(self: Self) -> Self: ...
14161416
def __next__(self) -> _T: ...
14171417

14181418
def repr(__obj: object) -> str: ...
@@ -1524,7 +1524,7 @@ class zip(Iterator[_T_co], Generic[_T_co]):
15241524
*iterables: Iterable[Any],
15251525
) -> zip[tuple[Any, ...]]: ...
15261526

1527-
def __iter__(self) -> Iterator[_T_co]: ...
1527+
def __iter__(self: Self) -> Self: ...
15281528
def __next__(self) -> _T_co: ...
15291529

15301530
# Signature of `builtins.__import__` should be kept identical to `importlib.__import__`

0 commit comments

Comments
 (0)