Hi, Le lundi 23 novembre 2015 10:55:40 UTC+1, Jeroen Demeyer a écrit : > > Of course, you could argue that Element > should not have __add__ and __mul__ (since not all elements can be added > or multiplied). But it doesn't really hurt to have them and raise > NotImplementedError (unless I'm missing something). > > Maybe a too naive remark: what you propose seems against standard object-oriented programming. Isn't it more clear to have a generic base class Element and implement __add__ and __mul__ only in derived classes, when relevant? Sorry, I don't know the details of the element classes, so you may have good reasons to do this...
Best wishes, Eric. -- 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/d/optout.