• Benjamin Peterson's avatar
    bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077) · d545869d
    Benjamin Peterson authored
    The recursive frame pruning code always undercounted the number of elided frames
    by one. That is, in the "[Previous line repeated N more times]" message, N would
    always be one too few. Near the recursive pruning cutoff, one frame could be
    silently dropped. That situation is demonstrated in the OP of the bug report.
    
    The fix is to start the identical frame counter at 1.
    d545869d
traceback.py 22.9 KB