diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 3aa74fa53..e568ce6a7 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -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__`