[Python-ideas] Have REPL print less by default
dan at tombstonezero.net
Sun Apr 17 22:33:31 EDT 2016
On Sun, 17 Apr 2016 21:04:11 -0400, Franklin? Lee wrote:
> These two behaviors and their corresponding functions could go into a
> special module which is (by default) loaded by the interactive shell. The
> behaviors can be turned off with some command-line verbosity flag, or tuned
> with command-line parameters (e.g. how many lines/pages to print).
The existing pretty print module already does some of what you want.
Instead of creating a new module, maybe extending that one would have
greater benefits to more users.
> - People who want the full output are probably advanced users with, like,
> high-limit or unlimited window size, and advanced users are more likely to
> look for a verbosity flag, or use a third-party REPL. Default should be
> newbie friendly, because advanced users can work around it.
Judging what others might find more friendly, or guessing what actions
they are more likely to take, can be dangerous.
> Thoughts? Even if the specific proposals are unworkable, is limiting
> REPL output (by default) a reasonable goal?
IMO, the default REPL should be as simple as possible, and respond as
directly as possible to what I ask it to do. It should also be [highly]
configurable for when you want more complexity, like summarizing stack
traces and paginating output.
More information about the Python-ideas