On 27 Mai, 21:53, Ronan Lamy <[email protected]> wrote:
> That should be true as well - repr is supposed to behave like that. And
> it's easy to implement: just define the __repr__ method to return the
> right thing.

For sure it is trivial to implement, but whether it is the right thing
is arguable. Personally, I surely don't want for example such
behavior:

>>> [x**4 - x**3*y - x*y**3 + y**4]
[Add(Mul(Integer(-1), Symbol('x'), Pow(Symbol('y'), Integer(3))),
Mul(Integer(-1), Symbol('y'), Pow(Symbol('x'), Integer(3)
)), Pow(Symbol('x'), Integer(4)), Pow(Symbol('y'), Integer(4)))]

> > In SymPy repr() == str() == sstr(). This has to work like this due to
> > a bug in Python (see issue 2388 for more details).
>
> What you mention is apparently a feature in Python, not a bug.

Well, call it "unwanted feature" if you prefer.

Vinzent

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
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.

Reply via email to