Right. I'm just not sure if there's any point within FreeModule that relies on having a method defined on sage.rings.commutative_ring.CommutativeRing, but possibly not in ParentMethods on the category. The only reason that changing the test in the __init__ method to checking "base_ring in CommutativeRings()" would be determining whether this was the case. David
On Sun, Oct 17, 2010 at 04:42, Florent Hivert <florent.hiv...@univ-rouen.fr>wrote: > On Sat, Oct 16, 2010 at 05:08:37PM -0400, David Roe wrote: > > You can either inherit from sage.rings.commutative_ring.CommutativeRing, > or > > modify FreeModule to work better with the category framework. The first > is > > probably the easier option. > > Just a note: Testing if some parent belong to a category is fairly trivial > (as > it should): > > sage: CC in CommutativeRings() > True > sage: QQ in CommutativeRings() > True > sage: CC in CommutativeRings() > True > sage: as3 = SymmetricGroup(3).algebra(QQ) # The algebra QQ[S3] > sage: as3 in CommutativeRings() > False > sage: as3 in Rings() > True > > Florent > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com<sage-devel%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org