Hi, I'm brand new to sage, just installed it on my mac, and was going through some of the examples and found a bug when I tried to multiply a piecewise function by a constant:
sage: x = PolynomialRing(QQ, 'x').gen() sage: f = Piecewise([[(0,1),1*x^0]]) sage: r = f*2 sage: r = 2*f --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /Users/boncelet/<ipython console> in <module>() /Users/boncelet/element.pyx in sage.structure.element.RingElement.__mul__ (sage/structure/element.c: 8545)() /Users/boncelet/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.bin_op_c (sage/ structure/coerce.c:5338)() TypeError: unsupported operand parent(s) for '*': 'Integer Ring' and '<type 'instance'>' -------- Multiplication should be communicative. I suspect the .__mul__ method is set incorrectly. (If memory serves, python can have separate methods for left and right multiplication.) ---CGB --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---