On Dec 28, 2007 10:09 AM, kent-and <[EMAIL PROTECTED]> wrote: > > > Hi, I would like to be able to switch between swiginac and sympy > objects to be able to test both packages (for a while). I have a > problem with multiplication with sympy objects. > > > import swiginac > import sympy > > x = swiginac.symbol("x") > y = sympy.Symbol("y") > > class Foo: > > def __init__(self): > self.field = 1.0 > > def __mul__(self, other): > print "Multiplication in Foo from right" > self.field = self.field * other > > def __rmul__(self, other): > print "Multiplication in Foo from left" > self.field = other * self.field > > f = Foo() > > f*x # works > x*f # works > > f*y # works > y*f # does not work > > > What should I do about this ?
Report it, as you just did. :) It's fixed and tested by this patch: http://hg.sympy.org/sympy/rev/732fc3bf4162 Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---