#10963: More functorial constructions
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: stumpc5
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.1
Component: categories | Resolution:
Keywords: days54 | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Simon King, Frédéric
Report Upstream: N/A | Chapoton
Branch: | Work issues:
public/ticket/10963 | Commit:
Dependencies: #11224, #8327, | 48dc0c06e567d07a70f1b45018f1e2a02cd434e7
#10193, #12895, #14516, #14722, | Stopgaps:
#13589, #14471, #15069, #15094, |
#11688, #13394, #15150, #15506 |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Nicolas, I think more things could potentially go wrong. Assume that
someone has a category class `CC` and has two axioms Axiom1 and Axiom2. As
it happens, both `CC().Axiom1()` and `CC.Axiom2()` return two
''different'' categories R1 and R2, but unfortunately both
`R1._axiom=='Axiom1'==R2._axiom`. It seems to me that in this situation it
would be possible to screw up (trying to construct an example now), if you
just test whether `CC.__dict__[R1._axiom]` is a lazy import (and then
override it).
Could it not happen that `CC.__dict__[R1._axiom]` happens to be R2? I
think this case should be barked at as well.
I believe the following should happen:
- if `CC.__dict__[R1._axiom]` is a `LazyImport` then presumably the
`LazyImport` had the wrong (or no) `as_name`. Rather than blindly putting
R1 into it, Sage should better raise an error and ask to provide the
correct name.
- if `CC.__dict__[R1._axiom]` is not a `LazyImport`, then it must be
tested whether it coincides with R1. If it doesn't, then certainly there
is something wrong, which should give rise to an error, too.
--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:363>
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/groups/opt_out.