mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
bpo-43950: Specialize tracebacks for subscripts/binary ops (GH-27037)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
da2e673c53
commit
1890dd235f
4 changed files with 367 additions and 47 deletions
|
@ -473,7 +473,7 @@ The output for the example would look similar to this:
|
|||
['Traceback (most recent call last):\n',
|
||||
' File "<doctest default[0]>", line 10, in <module>\n lumberjack()\n ^^^^^^^^^^^^\n',
|
||||
' File "<doctest default[0]>", line 4, in lumberjack\n bright_side_of_death()\n ^^^^^^^^^^^^^^^^^^^^^^\n',
|
||||
' File "<doctest default[0]>", line 7, in bright_side_of_death\n return tuple()[0]\n ^^^^^^^^^^\n',
|
||||
' File "<doctest default[0]>", line 7, in bright_side_of_death\n return tuple()[0]\n ~~~~~~~^^^\n',
|
||||
'IndexError: tuple index out of range\n']
|
||||
*** extract_tb:
|
||||
[<FrameSummary file <doctest...>, line 10 in <module>>,
|
||||
|
@ -482,7 +482,7 @@ The output for the example would look similar to this:
|
|||
*** format_tb:
|
||||
[' File "<doctest default[0]>", line 10, in <module>\n lumberjack()\n ^^^^^^^^^^^^\n',
|
||||
' File "<doctest default[0]>", line 4, in lumberjack\n bright_side_of_death()\n ^^^^^^^^^^^^^^^^^^^^^^\n',
|
||||
' File "<doctest default[0]>", line 7, in bright_side_of_death\n return tuple()[0]\n ^^^^^^^^^^\n']
|
||||
' File "<doctest default[0]>", line 7, in bright_side_of_death\n return tuple()[0]\n ~~~~~~~^^^\n']
|
||||
*** tb_lineno: 10
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue