On Thursday, January 30, 2020 at 12:52:06 PM UTC-8, Markus Wageringel wrote: > > From the different options mentioned here, my preferred choices are > > 2c) `pretty_print(D, sort=True)` for clarity, or > > 2d) `dict(sorted(D.items()))` for simplicity, as this makes use of > well-known functions and does not require any other changes. > > As Nils explained, for 2c (and even independently) it would make sense to > change the default display mode from `None` to `plain` in the command line, > but this would lead to a small dichotomy between the command line and the > notebook, which is why I am slightly hesistant about this. It would make it > a bit more difficult to doctest the notebook behavior. >
I do not think that's an issue at all. Presently, on the command line we *literally* get sage: pretty_print({1:2}) \newcommand{\Bold}[1]{\mathbf{#1}}\left\{1 : 2\right\} I don't think that satisfies anybody's idea of "pretty" printing. If you do the same thing in the notebook, you get a nicely mathjax typeset expression. We can't replicate that behaviour on the command line anyway, so going with "plain" wouldn't break anything: commandline and notebook already behave very differently. It is the case that get_display_manager().preferences.text is None holds in both at the moment, but we have that get_display_manager() prints as 'The Sage display manager using the IPython command line backend' and 'The Sage display manager using the IPython notebook backend' respectively, so they're already distinguishable. Setting different defaults in these different cases doesn't seem like a problem to me. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/ac84bf60-ed0c-46a1-9092-9e47b9970295%40googlegroups.com.