[Python-ideas] Have REPL print less by default
tjreedy at udel.edu
Tue Apr 19 18:12:51 EDT 2016
On 4/19/2016 10:03 AM, Michael Selik wrote:
> On Tue, Apr 19, 2016 at 5:36 AM Franklin? Lee
> <leewangzhong+python at gmail.com
> <mailto:leewangzhong%2Bpython at gmail.com>>
> On Apr 19, 2016 4:09 AM, "Paul Moore"
> <p.f.moore at gmail.com
> <mailto:p.f.moore at gmail.com>> wrote:
> > Basic users should probably be using a tool like IDLE, which has a bit
> > more support for beginners than the raw REPL.
> 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
> That's probably because your professors thought you were more advanced
> than other new Pythonistas, because you were CS students. If I were in
> their shoes, I might chose a different approach depending on the level
> of the course.
>> But that doesn't answer my question: would the proposed change hurt
> your workflow?
> It might. Would it affect doctests? Would it make indirect infinite
> recursion more difficult to trace? Would it make me remember yet another
> command line option or REPL option to turn on complete reprs? Would it
> force me to explain yet another config setting to new programmers?
> I think a beginner understands when they've printed something too big. I
> see this happen frequently. They laugh, shake their heads, and retype
> whatever they need to.
> If they're using IDLE, they say, "OMG I crashed it!" then they close the
> window or restart IDLE.
Recursion limit tracebacks with 2000 short lines (under 80 chars) are
not a problem for tk's Text widget. Long lines, from printing something
line 'a'*10000 or *5000 make the widget sluggish. Too many or too
long may require a restart.
> I'd say it's more a problem in IDLE than in the default REPL.
Its a problem with using an underlying text widget optimized for
managing 'sensible' length '\n' delimited lines.
Terry Jan Reedy
More information about the Python-ideas