[Python-ideas] Have REPL print less by default
Ethan Furman
ethan at stoneleaf.us
Mon Apr 18 11:51:46 EDT 2016
On 04/18/2016 08:41 AM, Franklin? Lee wrote:
> On Apr 18, 2016 3:25 AM, "Nick Coghlan" wrote:
>> A few tips for folks that want to play with this:
>>
>> - setting sys.displayhook controls how evaluated objects are
>> displayed in the default REPL
>> - setting sys.excepthook does the same for exceptions
>> - the PYTHONSTARTUP env var runs the given file when the default REPL
>> starts
>>
>> So folks are already free to change their REPL to work however they
>> want it to: set sys.displayhook and sys.excepthook from a PYTHONSTARTUP file
>
> I don't want arguments like, "This can already be done, for yourself, if
> you really need it." I use IPython's shell, with maximum output height,
> and it was years ago that I used a terminal which I couldn't scroll.
>
> I want arguments like, "This will break my workflow."
How about: the default REPL is a basic tool, and the limitations of
basic tools are what drive folks to seek out advanced tools. ?
Or Marc-Andre's:
> I [...] don't think the defaults should be such that you have to
> enable some variable to see everything. This would make debugging
> harder than necessary, since often enough (following Murphy's law)
> the most interesting information would be hidden in some ellipsis.
Or even Nick's (that you snipped):
> Since the more the REPL does, the more opportunities there are for
> it to break when debugging, having the output hooks be as simple as
> possible is quite desirable.
IMO those are all good reasons to leave the basic REPL alone.
--
~Ethan~
More information about the Python-ideas
mailing list