[issue44569] traceback.py: Allow customization of per-frame line formatting in StackSummary
Ammar Askar
report at bugs.python.org
Mon Jul 5 12:47:05 EDT 2021
New submission from Ammar Askar <ammar at ammaraskar.com>:
During the implementation of PEP 657, Terry Jan Reedy pointed out that in the format method of traceback.StackSummary there are two roles being fulfilled, there is some logic to handle omitting repeated lines involved in recursive calls and then the core per-frame formatting logic:
https://github.com/python/cpython/blob/17f94e28882e1e2b331ace93f42e8615383dee59/Lib/traceback.py#L484-L503
To allow the per-line formatting to be overridden easily, these lines should be split into a separate method.
----------
assignee: ammar2
components: Library (Lib)
messages: 397009
nosy: BTaskaya, ammar2, pablogsal, terry.reedy
priority: normal
severity: normal
status: open
title: traceback.py: Allow customization of per-frame line formatting in StackSummary
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44569>
_______________________________________
More information about the Python-bugs-list
mailing list