Hi Vincent, On 2013-11-08, Vincent Delecroix <[email protected]> wrote: > I was working with #15378 and I wondered why SchemeMorphism inherits > from Element and not from Morphism as they should.
It *should* in fact inherit from both. In fact, some time ago, I tried to provide both Morphism and Element as base classes for SchemeMorphism. The problem is: Python allows you to use both base classes (it believes that both base classes have a compatible layout), but then some cdef attribute of Element gets confused with some cdef attribute of Morphism. Hence, in fact these two base classes do *not* have compatible layout, and it is a bug that Python does not raise an error when you try to create a class that uses both base classes at the same time. So, in this case, multiple inheritance is a no-op, and thus the category framework is your friend... 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.
