#16320: Handle finite slices for infinite enumerate sets
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: categories | Resolution:
Keywords: infinite | Merged in:
enumerated set slices | Reviewers: Nathann Cohen
Authors: Travis Scrimshaw | Work issues:
Report Upstream: N/A | Commit:
Branch: | 7ed705cb04f4b7b75709541fc850bcc15d6b3742
public/infinite_enum_set_slices-16320| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by nthiery):
Thanks Travis!
The logic is broken for finite enumerated sets:
{{{
sage: F = FiniteEnumeratedSet([1,2,3])
sage: F[1:]
...
TypeError: range() integer end argument expected, got NoneType.
}}}
(in the current examples, `.list()` has already been called, so this piece
of the code was not exercised). It might be an option to call
`__getitem__` from `EnumeratedSets` to avoid duplicating the logic.
Please also add the warnings along the lines of [comment:6].
--
Ticket URL: <http://trac.sagemath.org/ticket/16320#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.