[Python-ideas] Have REPL print less by default

Paul Moore p.f.moore at gmail.com
Tue Apr 19 05:48:54 EDT 2016


On 19 April 2016 at 10:36, Franklin? Lee <leewangzhong+python at gmail.com> wrote:
> On Apr 19, 2016 4:09 AM, "Paul Moore" <p.f.moore at gmail.com> wrote:
>>
>> On 19 April 2016 at 05:52, Franklin? Lee <leewangzhong+python at gmail.com>
>> wrote:
>> >> How about:  the default REPL is a basic tool, and the limitations of
>> >> basic
>> >> tools are what drive folks to seek out advanced tools. ?
>> >
>> > The REPL is a basic tool for basic users, which is why it should "Do
>> > the right thing" for people who wouldn't know better. I'm asking
>> > whether this is the "right thing" for those basic users: Advanced
>> > users are the ones who can use more than basic info.
>> >
>>
>> Basic users should probably be using a tool like IDLE, which has a bit
>> more support for beginners than the raw REPL.
>
> You say "should"? Do you mean that it is likely, or do you mean that it is
> what would happen in an ideal world? My college had CS students SSH into the
> department's Linux server to compile and run their code, and many teachers
> don't believe that students should start with fancy IDE featues like, er,
> syntax highlighting.

I mean that that is what I hear people on lists like this saying as "a
reasonable beginner environment". It means that the people I've
introduced to Python (on Windows) have tended to end up using IDLE
(either from the start menu or via "edit with IDLE" from the right
click menu on a script).

My experience (in business, environments) is that people expect an IDE
when introduced to a new programming language, and IDLE, like it or
not, is what is available out of the box with Python.

> You (and most regulars on this list) can adjust your shell to the way you
> like it, or use a more sophisticated shell, like IPython or bpython. On the
> other hand, changing shells and adding display hooks to site.py is not an
> option for those who don't know it's an option.

As a "scripting expert" and consultant, I typically get asked to knock
up scripts on a variety of environments. I do not normally have what
I'd describe as "my shell", just a series of basic "out of the box"
prompts people expect me to work at. So no, the luxury of configuring
the default experience is *not* something I typically have.

>> I view the REPL as more
>> important for intermediate or advanced users who want to quickly test
>> out an idea (at least, that's *my* usage of the REPL).
>
> But that doesn't answer my question: would the proposed change hurt your
> workflow?

Yes. If I get a stack trace, I want it all. And if I print something
out, I want to see it by default. The REPL for me is an investigative
environment for seeing exactly what's going on.

(Also, having the REPL behave differently depending on what version of
Python I have would be a problem - backward compatibility applies here
as much as anywhere else).

Paul


More information about the Python-ideas mailing list