-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Make a good use of the EmptySetError in EnumeratedSets and Parent #10651
Comments
Changed keywords from empty set, EmptySetError to days28, empty set, EmptySetError |
comment:3
Technically, some_elements should return an iterable, not an iterator, so you can iterate over it more than once. The except clause should be changed to return [], not return iter([]), though with the empty case the behavior is the same. |
comment:4
Good point. I will ask today Nicolas what does he think about that... I don't really know the specifications for the Test Suite and how deal exactly with such corner case.
I will give an answer shortly for that. |
comment:5
As this ticket fix a corner case and try to increase of the coherence for the code about sets, it have to verify all the specifications. Thanks you very much Robert for pointing this. It now return []. Even the behavior is the same, I don't want to fix a mathematical corner case by introducing a Spec corner case... It should be ready for review now. |
comment:6
I confirm the problem is fixed, and all doctests still pass. Paul |
Reviewer: Paul Zimmermann |
Author: Nicolas Borie |
comment:7
I think you should add an example which shows the |
comment:8
I just had two tests... Especially one which returns the EmptySetError... Thanks all for your comments and suggestions. |
comment:9
after thought, the on-line documentation of Paul |
Work Issues: update documentation |
comment:11
Looking good now. |
comment:13
You should change the commit message of the patch (using |
Changed work issues from update documentation to none |
comment:14
Attachment: trac_10651_fix_an_element_from_iterator-nb.patch.gz In order to fix more things in the same time, I update the description of this ticket. I folded the NT'reviewer from the sage-combinat queue, then I uploaded the patch with a better commit message. I am very OK with the changes in the Parent structure from Nicolas Thiéry. I give a positive review on all changes touching the corresponding file. The first part of the patch still comes from me, so no review from me. |
Changed reviewer from Paul Zimmermann to Paul Zimmermann, Robert Bradshaw, Nicolas Borie |
This comment has been minimized.
This comment has been minimized.
Changed author from Nicolas Borie to Nicolas Borie, Nicolas M. Thiéry |
_an_element_from_iterator
in EnumeratedSets
comment:15
And positive review on your part. Good to go! |
Changed reviewer from Paul Zimmermann, Robert Bradshaw, Nicolas Borie to Paul Zimmermann, Robert Bradshaw, Nicolas Borie, Nicolas M. Thiéry |
Merged: sage-4.7.alpha3 |
As Florent Hivert gave extremely useful features about empty things, we should use it. The Following should returns an EmptySetError
Also, make the EmptySetError being documented already in the structure of Parent. Improve the documentation of an_element and
_an_element_
in Parent.CC: @sagetrac-sage-combinat
Component: categories
Keywords: days28, empty set, EmptySetError
Author: Nicolas Borie, Nicolas M. Thiéry
Reviewer: Paul Zimmermann, Robert Bradshaw, Nicolas Borie, Nicolas M. Thiéry
Merged: sage-4.7.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/10651
The text was updated successfully, but these errors were encountered: