On Thu, Sep 19, 2013 at 10:30 AM, Peter Bruin <pjbr...@gmail.com> wrote: > Hi Robert, > > >> > I would expect the category framework to figure out that if R is an >> > object >> > in EuclideanDomains, then R.element_class should dynamically inherit >> > from >> > both EuclideanDomainElement and IntegralDomainElement. >> >> It already does. R need not descend from EuclideanDomain, it simply >> declares its category as EuclideanDomains. > > > Yes, I just added this to emphasise that I do want this to happen via the > category framework and not via static inheritance. > >> >> The difference between your proposal and what currently exists are >> >> (1) The Element[Methods] class is attached to the category's >> ParentMethods, rather than the category itself > > > Exactly; this is what I would like to be the case. I don't propose any > other changes except the ones needed to make this possible.
So the proposed change isn't really that big after all, just a renaming and the addition of one level of nesting. class MyCategory(Cagetory_singleton): class Object: ... class Element: ... vs class MyCategory(Cagetory_singleton): class ParentMethods: ... class ElementMethods: ... I don't have strong opinions about this, other than avoiding unnecessary churn. Note that RingElement, with its coercion-specialized __div__, _div_, etc. would still be a concrete ancestor separate from the category framework, mostly for technical reasons, but most of this concrete element hierarchy could/should go away. - Robert -- 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/groups/opt_out.