Hi,
> Le 2 juin 2019 à 21:40, Oscar Benjamin <[email protected]> a écrit :
> 
> Hi Jean,

Thanks for your quick answer.

> What version of SymPy are you using?
> This seems to work fine on SymPy master and with the most recent version 
> (1.4):

I'm also using 1.4.

> In [1]: repr(Mul(-1, 2, 5, evaluate=False))
> Out[1]: '-2*5'

True, but…

>>> repr(Mul(-2, 5, evaluate=False))
'-10'

In fact, all the problem lies here:

>>> # same...
... srepr(Mul(-1, 2, 5, evaluate=False))
'Mul(Integer(-1), Integer(2), Integer(5))'
>>> srepr(Mul(-2, 5, evaluate=False))
'Mul(Integer(-1), Integer(2), Integer(5))'
>>> 
>>> # but different
... repr(Mul(-1, 2, 5, evaluate=False))
'-2*5'
>>> repr(Mul(-2, 5, evaluate=False)) # Hoops!
'-10'
>>> 
>>> # even weirder
... init_printing()
>>> Mul(-1, 2, 5, evaluate=False)
-2⋅5
>>> Mul(-2, 5, evaluate=False) # here all is fine!
-2⋅5


Kind regards,
Jean Abou Samra

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/45D94875-5286-4A9C-B9B2-7812DF70A0B7%40abou-samra.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to