#14541: Family over enumerated set has wrong category
--------------------------------------------------------------+-------------
Reporter: cnassau | Owner:
nthiery
Type: defect | Status:
new
Priority: minor | Milestone:
sage-5.10
Component: categories | Resolution:
Keywords: Family, Category of finite enumerated sets | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------------------------------------+-------------
Comment (by cnassau):
The attached patch changes the category initialization of {{{LazyFamily}}}
objects: if the keys {{{K}}} are an instance of {{{CombinatorialClass}}}
the category choice now depends on "{{{K.cardinality() < Infinity}}}" in
the obvious way.
(I have not tried to inspect the keys {{{K}}} further, because I could not
find a {{{CombinatorialClass}}} without custom {{{cardinality}}} method.)
I have also added another exception to {{{LazyFamily.cardinality()}}}: the
code used to check for {{{AttributeError}}} and {{{NotImplementedError}}},
but {{{CartesianProduct(...).__len__}}} raises a {{{TypeError}}} instead.
I've added a doctest that fails otherwise.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14541#comment:4>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.