Skip to content

Commit b852232

Browse files
Merge pull request #537 from StanislawSwierc:fixgenpairs
PiperOrigin-RevId: 245308938
2 parents 89ba33d + f064512 commit b852232

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/tensorflow_docs/api_generator/parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,7 @@ def _gen_pairs(items):
386386
The original items, in pairs
387387
"""
388388
assert len(items) % 2 == 0
389-
items = iter(items)
390-
while True:
391-
yield next(items), next(items)
389+
return zip(items[::2], items[1::2])
392390

393391

394392
class _FunctionDetail(

0 commit comments

Comments
 (0)