#14054: Cythoned UniqueRepresentation
-----------------------------------------------+----------------------------
Reporter: SimonKing | Owner: tbd
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.8
Component: performance | Resolution:
Keywords: cython UniqueRepresentation | Work issues:
Report Upstream: N/A | Reviewers: Travis
Scrimshaw
Authors: Simon King | Merged in:
Dependencies: #14017, #6495 | Stopgaps:
-----------------------------------------------+----------------------------
Comment (by SimonKing):
Replying to [comment:27 nbruin]:
> This parent mismatch happens in a morphism call. If a morphism gets
registered in the wrong slot in a conversion/coercion then it could indeed
end up getting mismatched input
If it is in a wrong slot (you mean: Addressed by a non-identic copy of a
parent?) then it should simply not occur here, because `TripleDict` would
compare by identity.
> (shouldn't `__call__` be a little more permissive about its arguments by
the way? Certainly, an error would be more appropriate than an assert if
this is something that actually can go wrong)
No, I think an assertion is the right thing to here. Perhaps one could
provide the assertion with an error message that names the two parents
that don't much. In that way, we could at least see what two parents are
involved.
Note that my patch changes `CombinatorialFreeModule` from
`UniqueRepresentation` to `CachedRepresentation`, since it overrides the
equality tests. So, it could actually be that the two parents are
genuinely non-unique. And since a cached_method is involved here, which
does comparison by equality and not identity, we could really be in
trouble here.
Of course, it could be that changing to `CachedRepresentation` was wrong
in this case.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14054#comment:28>
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.