-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
In particular, we should specify and document what exactly zip does when its first child terminates. Currently, as soon as self.a.next()
returns None, it short-circuits execution without calling self.b.next()
. This could lead to some potential surprising behavior:
self.a 1 2 3 5 6
self.b 1 2 3 4 5 6
------
self 11 22 33 54 65
To be clear, I'm not saying this behavior is bad; just that it should be more explicitly documented. This will allow developers to more confidently build abstractions on top of Zip, knowing exactly what it does with the underlying iterator.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.