#10667: Morphisms and Objects of Categories
--------------------------------------------------+-------------------------
Reporter: SimonKing | Owner: nthiery
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: categories | Keywords: objects
morphisms containment
Work_issues: Cope with non-unique number fields | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #9138,
#11115, #11780
--------------------------------------------------+-------------------------
Comment(by SimonKing):
Replying to [comment:57 nthiery]:
> > But I think it would be a good idea to add a `X._reduce_from_cache()`
method to `UniqueRepresentation`: It would remove any item of
`X.__class__.__classcall__.cache` whose value is (equal to) X,
>
> +1. I am not sure about the name though. What about something like
> _delete_from_cache instead?
Sorry, I meant to write `_remove_from_cache`, not `_reduce_from_cache`.
> > and then it would try `X._reduce_from_homset_cache()` as well (which
> > would of course only be available for rings).
>
> UniqueRepresentation is meant to also be used by non Parents.
And `_reduce_from_homset_cache` is only for those parents that happen to
belong to the category of rings. That's why I write "try ... (which would
... only be available for rings)". It would not be available for non-
rings, and in particular not for non-parents. So, no problem, the
attribute error would be caught anyway.
> Parent
> could overload UniqueRepresentation's method to also call that for
> homsets.
No, it could not, because most parents are no `UniqueRepresentation`s.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10667#comment:59>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.