-
Notifications
You must be signed in to change notification settings - Fork 22
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
Implement iteration over GAP iterators #967
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logically, this extension is fine:
Up to now, a new GAP iterator gets created when Julia iterates over a domain. Now a new iterator (a shallow copy) gets created when Julia iterates over a GAP iterator.
Perhaps the differences between iterating in GAP and in Julia can be documented (where is a good place for that?), in order to avoid confusion:
- Iterating in GAP over an iterator changes the iterator, iterating in Julia doesn't.
- Iterating in GAP over a list with holes skips the holes, iterating in Julia over a GAP list with holes also iterates over the holes (well, the holes before the end of the list) by returning
nothing
for each hole.
I could of course change it so that Julia iteration also "eats up" the GAP iterator. It just seemed less useful and would make it behave less like a Julia iterator. That said, how would this cause trouble for anyone coming from GAP? Maybe people would copy iterators too often thinking they need to, but that's note a major issue.
Ah, good point. Perhaps we should skip holes? I don't think it was a very intentional decision to not skip them. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #967 +/- ##
==========================================
+ Coverage 75.80% 75.85% +0.05%
==========================================
Files 51 51
Lines 4187 4188 +1
==========================================
+ Hits 3174 3177 +3
+ Misses 1013 1011 -2
|
@fingolfin The message |
No description provided.