On Friday 20 June 2008 14:30:29 Pearu Peterson wrote: > On Jun 20, 11:42 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > > >> Also, let's get rid of set_repr_level()? This is quite an important > > >> change, so I'd like to hear opinions of others as well. > > > > > > We already had this discussion in the past: > > > > > >http://code.google.com/p/sympy/issues/detail?id=697 > > > > > > And I think repr(x) should be "Symbol('x')", str(x) should be "x" and > > > there should be no Basic.set_repr_level. > > > > Agree. So you mean this, right Kirill? > > > > >>> repr(x**2/2) > > > > Mul(Half(1, 2), Pow(Symbol('x'), Integer(2))) > > There is a problem with this representation - it will > be implementation dependent (say, one will change > the Half to something else like Rational). > > Another solution to the repr probelm is to return > > sympify('x**2/2') > > that will satisfy the basic assumption behind repr: > > eval(repr(obj)) == obj > > (assuming that the parser works correctly) and > is well readable. > > Pearu
Commited in Python 3k beta_1: http://www.python.org/dev/peps/pep-3138/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---