Hi
In one case I was forced to use CommutativeAlgebraElement because I
needed it's operations (e.g. __mul__) even though the category/class
from the parent (module) doesn't support it:
It sometimes makes sense to view (homogeneous) elements of a graded
ring as module elements (because operations might be specific to that
module and not to the whole ring).
On the other hand we still want to be able to multiply those *module*
elements of possibly different homogeneous parts.
So if we inherit from CommutativeAlgebraElement we get the __mul__
operation but we can still treat elements as module elements...
Or what is the "modern" approach/solution for this?
I found my own way of working with graded rings in sage but I also
noticed that the framework doesn't solve all problems and tricks
have to be used...
Best
Jonas
On 27.11.2015 13:59, Simon King wrote:
Hi Jeroen,
On 2015-11-26, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
On 2015-11-23, Travis Scrimshaw <tsc...@ucdavis.edu> wrote:
However, I'm +1 for flatting things down to Element as it would probably
solve #15160 <http://trac.sagemath.org/ticket/15160> and #15947
<http://trac.sagemath.org/ticket/15947>.
See #18756 or #18758. I think these would solve it eventually.
I don't really see how those tickets are related to getting rid of
classes like RingElement.
Perhaps I recall wrongly what I did in these tickets. Anyway, what I
recall is this:
- Implement the generic coercion framework in Element rather than in
RingElement.
- Make it possible to implement an action via parent methods of a
category.
- Preserve RingElement and friends for backwards compatibility and for
applications for which few nanoseconds slowdown in multiplication
matter.
Best regards,
Simon
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.