Le vendredi 27 mai 2011 à 20:39 +0200, Mateusz Paprocki a écrit : > Hi, > > On 27 May 2011 20:33, [email protected] > <[email protected]> wrote: > I know (or I think I know) that eval(srepr(thing)) == thing in > sympy. > > > Yes, that should hold (otherwise it's a bug). > > > Should this be also true for repr (the python build-in)? Why > are there two different functions that should be doing the > same thing? Is repr hard do modify? > 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. > > 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.
-- 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.
