[Python-ideas] Have REPL print less by default
leewangzhong+python at gmail.com
Tue Apr 19 06:10:29 EDT 2016
On Apr 19, 2016 5:48 AM, "Paul Moore" <p.f.moore at gmail.com> wrote:
> > You say "should"? Do you mean that it is likely, or do you mean that it
> > what would happen in an ideal world? My college had CS students SSH
> > department's Linux server to compile and run their code, and many
> > don't believe that students should start with fancy IDE featues like,
> > 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).
But are they perhaps tending to use IDLE because you were the one
introducing them to it? Whether it is a recommended environment by the
consensus of mailing lists is hardly indicative that IDLE is what people
will start on.
> 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.
They expect it => they know what an IDE is. Programmers are already
half-intermediate, especially programmers who use IDEs.
> > You (and most regulars on this list) can adjust your shell to the way
> > like it, or use a more sophisticated shell, like IPython or bpython. On
> > other hand, changing shells and adding display hooks to site.py is not
> > 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 suggested a command-line switch.
> >> 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.
And why is it an insufficient option for you to type, for example,
"_exfull()" to get the full trace?
> (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).
This is a concern, but not one that is enough, by itself, to justify the
status quo. I disagree that it applies *anywhere near as much* here, since
I don't see how it could break existing code. It will add a little
adjustment and a little more work sometimes, but it doesn't require, say,
refactoring a module, or every site page you ever downloaded.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas