mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
special-case overload for itertools.product with 'repeat' (#1410)
Add an additional overload for the `repeat = n` case. Since we don't know the numeric value of `repeat`, this just produces an iterator over an arbitrary-length tuple.
This commit is contained in:
committed by
Jukka Lehtosalo
parent
4fbdcf5b03
commit
5d1aacfed3
@@ -128,6 +128,8 @@ def product(iter1: Iterable[Any],
|
||||
iter5: Iterable[Any],
|
||||
iter6: Iterable[Any],
|
||||
iter7: Iterable[Any], *iterables: Iterable) -> Iterator[Tuple]: ...
|
||||
@overload
|
||||
def product(*iter: Iterable[_T], repeat: int) -> Iterator[Tuple[_T, ...]]: ...
|
||||
|
||||
def permutations(iterable: Iterable[_T],
|
||||
r: int = ...) -> Iterator[Sequence[_T]]: ...
|
||||
|
||||
Reference in New Issue
Block a user