-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationiterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocol
Description
An old comment from Keno says that "iterators don't in general have a strong guarantee over their ordering". This seems like a large gap in our documentation. Looking at the docstring for UnitRange, there is no mention of the iteration order. So the following code is undefined:
x, y = 1:2There's no guarantee that x == 1 and y == 2.
I propose that we update the docstrings for the various iterators in Base to make it clear which iterators have a well-defined iteration order. Perhaps we could use the word sequence to describe iterators with a well-defined iteration order.
Metadata
Metadata
Assignees
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationiterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocol