[Python-ideas] Have REPL print less by default

Koos Zevenhoven k7hoven at gmail.com
Wed Apr 20 06:39:21 EDT 2016


On Wed, Apr 20, 2016 at 1:28 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 4/19/2016 12:18 PM, Steven D'Aprano wrote:
>>
>> I mostly agree with what you say, but I would like to see one change to
>> the default sys.excepthook: large numbers of *identical* traceback lines
>> (as you often get with recursion errors) should be collapsed. For
>> example:
>
>
> Tracebacks produce *pairs* of lines: the location and the line itself.

Not always, as Steven's example shows. For example:

def fun():
    fun()

fun()

Does that.

But yes, as I wrote in my previous email, it should recognize a block
of several lines repeating, too.

-Koos


More information about the Python-ideas mailing list