* Simon King <[email protected]> [2013-09-16 11:50:35 +0000]:

> On 2013-09-16, Julian Rüth <[email protected]> wrote:
> > True, and anything else would be extremely confusing. However, this is
> > the actual problem with Fields.ElementMethods.is_unit(): RingElement
> > defines is_unit(), so if an element inherits from RingElement it will
> > never use that method.
> 
> Sadly yes.
> 
> > Or is there a scenario where the parent of a
> > RingElement is not in Rings()?
> 
> The parent of RingElement can be *anything*, the type or the category of
> the parent is not tested when an element is created. But at least it is
> the case that any sage.rings.ring.Ring instance is in Rings()---provided
> that its __init__() is called. Sadly, there are some classes that don't
> call __init__() of their base classes, IIRC.

So in the (very strange) case that the parent of a RingElement() is not
in Rings(), then the implementation of is_unit() probably does not make
any sense anyway, right? So, is there any problem with removing
is_unit() from RingElement() and adding it to Rings.ElementMethods? I
can not see where this would cause a problem.

julian

Attachment: pgpFRHEvwxLOi.pgp
Description: PGP signature

Reply via email to