Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain Enumerable ordering #73

Closed
viralogic opened this issue Feb 19, 2022 · 0 comments · Fixed by #76
Closed

Retain Enumerable ordering #73

viralogic opened this issue Feb 19, 2022 · 0 comments · Fixed by #76
Assignees
Labels

Comments

@viralogic
Copy link
Owner

Current implementation of the Enumerable results in inconsistent results when calling methods such as first(). For example:

e = Enumerable((x for x in range(0, 5)))
e.first() # 0
e.first() # 1

As you can see, both the calls to first() should give 0.

This is because of how the repeatable iterator is implemented for the Enumerable does not keep track of the start of the iterator when it is exhausted/used. Thus, subsequent calls of any methods that require iterating over the Enumerable could start from a non-zero start position and possibly give different results for subsequent calls.

@viralogic viralogic self-assigned this Feb 19, 2022
@viralogic viralogic added the bug label Jun 1, 2022
viralogic pushed a commit that referenced this issue Jun 30, 2022
viralogic pushed a commit that referenced this issue Aug 2, 2022
viralogic pushed a commit that referenced this issue Aug 3, 2022
viralogic pushed a commit that referenced this issue Aug 6, 2022
viralogic pushed a commit that referenced this issue Aug 10, 2022
viralogic pushed a commit that referenced this issue Aug 10, 2022
viralogic pushed a commit that referenced this issue Aug 11, 2022
@viralogic viralogic linked a pull request Feb 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant