Bug report
Bug description:
in REPL input following sequentially
import dis
- some invalid code
dis.distb()
>>> import dis
>>> ???
File "<stdin>", line 1
???
^
SyntaxError: invalid syntax
>>> dis.distb()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
dis.distb()
~~~~~~~~~^^
File "/home/dev/cpython/Lib/dis.py", line 150, in distb
while tb.tb_next: tb = tb.tb_next
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'tb_next'
It looks like dis.distb() doesn’t handle the case where the previous exception’s traceback could be None in the REPL.
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
Windows
Linked PRs
Bug report
Bug description:
in REPL input following sequentially
import disdis.distb()It looks like
dis.distb()doesn’t handle the case where the previous exception’s traceback could be None in the REPL.CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
Windows
Linked PRs