The public API would be StrPrinter(dict(order="none")).doprint(u).
But you can also use sstr(u, order='none'). Aaron Meurer On Sat, Nov 2, 2019 at 12:58 PM Chris Smith <[email protected]> wrote: > > Shouldn't there be an easier way to change printer settings than this: > > >>> u = parse_expr("-5 + 2*x + 3 - 7*x + 5 - 3*x", evaluate=False); u > > -7*x - 3*x + 2*x - 5 + 3 + 5 > > >>> u.args > (-5, 2*x, 3, -7*x, 5, -3*x) > > >>> s=StrPrinter() > > >>> s._default_settings['order'] = 'none' # < -- isn't there a better way? > > >>> s._print_Add(u) > -5 + 2*x + 3 - 7*x + 5 - 3*x > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/778a2537-da80-42df-9db1-a9c82293e791%40googlegroups.com. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6Khn18Xk6c31teUpdD0MbOhcU8Ng55_wLOr2SzUihpW1g%40mail.gmail.com.
