Stdlib: add 'obvious' default values (#9688)

This commit is contained in:
Alex Waygood
2023-02-07 12:00:40 +00:00
committed by GitHub
parent 60789273a2
commit 53747b264e
17 changed files with 104 additions and 104 deletions

View File

@@ -51,7 +51,7 @@ class repeat(Iterator[_T], Generic[_T]):
class accumulate(Iterator[_T], Generic[_T]):
if sys.version_info >= (3, 8):
@overload
def __init__(self, iterable: Iterable[_T], func: None = ..., *, initial: _T | None = ...) -> None: ...
def __init__(self, iterable: Iterable[_T], func: None = None, *, initial: _T | None = ...) -> None: ...
@overload
def __init__(self, iterable: Iterable[_S], func: Callable[[_T, _S], _T], *, initial: _T | None = ...) -> None: ...
else:
@@ -87,7 +87,7 @@ class filterfalse(Iterator[_T], Generic[_T]):
class groupby(Iterator[tuple[_T, Iterator[_S]]], Generic[_T, _S]):
@overload
def __new__(cls, iterable: Iterable[_T1], key: None = ...) -> groupby[_T1, _T1]: ...
def __new__(cls, iterable: Iterable[_T1], key: None = None) -> groupby[_T1, _T1]: ...
@overload
def __new__(cls, iterable: Iterable[_T1], key: Callable[[_T1], _T2]) -> groupby[_T2, _T1]: ...
def __iter__(self: Self) -> Self: ...