> everything works well (no output), but when I run F._test_elements() I > get an error in ... _test_category(). The precise error is listed > below, but the traceback tells me that the problem arose in > element.pyx: > > if not is_extension_type(self.__class__): > # For usual Python classes, that should be done with > # standard inheritance > tester.assert_(isinstance(self, > self.parent().category().element_class)) > > Did I mess up with my use of the sage categories somewhere? Any help > would be much appreciated, and I can readily supply additional > information.
Did you tell the parent what is the class of its elements ? Specifically when creating a parent with the category framework you need either to write class MyParentClass(...): ... class Element(...): ... Or else class MyElementClass(...): ... class MyParentClass(...): ... Element = MyElementClass Then the category framework create for you a dynamic class called MyParentClass.element_class Hope this helps, Cheers, 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 For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org