Hi Julian, On 2013-09-16, Julian Rüth <julian.ru...@fsfe.org> wrote: > 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.
>From my perspective, the only potential issue is speed. Even a Python function returning the constant "True" is quite slow. But I think, if speed matters, it should be possible to have a separate Cython module providing a class, say, sage.categories.element_methods.FieldElementMethods, and then assign Fields.ElementMethods = FieldElementMethods. In that way, elements of rings would inherit a method is_unit that probably is faster what we currently have. PS: FieldElementMethods or RingElementMethods or whatever is appropriate... 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/groups/opt_out.