@@ -380,7 +380,7 @@ loops that truncate the stream.
380
380
saved.append(element)
381
381
while saved:
382
382
for element in saved:
383
- yield element
383
+ yield element
384
384
385
385
Note, this member of the toolkit may require significant auxiliary storage
386
386
(depending on the length of the iterable).
@@ -615,10 +615,10 @@ loops that truncate the stream.
615
615
This function is roughly equivalent to the following code, except that the
616
616
actual implementation does not build up intermediate results in memory::
617
617
618
- def product(*args , repeat=1):
618
+ def product(*iterables , repeat=1):
619
619
# product('ABCD', 'xy') → Ax Ay Bx By Cx Cy Dx Dy
620
620
# product(range(2), repeat=3) → 000 001 010 011 100 101 110 111
621
- pools = [tuple(pool) for pool in args ] * repeat
621
+ pools = [tuple(pool) for pool in iterables ] * repeat
622
622
result = [[]]
623
623
for pool in pools:
624
624
result = [x+[y] for x in result for y in pool]
@@ -735,9 +735,9 @@ loops that truncate the stream.
735
735
iterables are of uneven length, missing values are filled-in with *fillvalue *.
736
736
Iteration continues until the longest iterable is exhausted. Roughly equivalent to::
737
737
738
- def zip_longest(*args , fillvalue=None):
738
+ def zip_longest(*iterables , fillvalue=None):
739
739
# zip_longest('ABCD', 'xy', fillvalue='-') → Ax By C- D-
740
- iterators = [iter(it) for it in args ]
740
+ iterators = [iter(it) for it in iterables ]
741
741
num_active = len(iterators)
742
742
if not num_active:
743
743
return
0 commit comments