> /sage/local/lib/python2.7/site-packages/sage/structure/factorization.pyc > in __cmp__(self, other) > 426 c = cmp(self.__unit, other.__unit) > 427 if c: return c > --> 428 return list.__cmp__(self, other) > 429 > 430 def __copy__(self): > > AttributeError: type object 'list' has no attribute '__cmp__' >
This is really old code, added in #1805, written by William. The offending line seems to be run when self.value() or other.value() throws an Exception. I don't understand when this should be the case, and evidently, there's no doctest for it. The discussion on #1805 doesn't reveal the intention either. list implements the rich-style comparisons __gt__, __lt__, etc. So presumably, the list.__cmp__ line should be somehow rewritten to this? It would be nice to have an example where the code line is run, though. Best, Johan -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.