diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2021-07-04 19:14:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 00:14:33 +0100 |
commit | 5644c7b3ffd49bed58dc095be6e6148e0bb4431e (patch) | |
tree | c53063e2f78685d1f284f6e333e05f44e49ea5ca /Python/_warnings.c | |
parent | 693cec0e2dcafa393ed5cdaa606f8dc8e3876adf (diff) | |
download | cpython-git-5644c7b3ffd49bed58dc095be6e6148e0bb4431e.tar.gz |
bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)
The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location
to print carets on the specific expressions involved in a traceback.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 9c8815c1a3..9f68da2087 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -544,7 +544,7 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyFile_WriteString("\n", f_stderr); } else { - _Py_DisplaySourceLine(f_stderr, filename, lineno, 2); + _Py_DisplaySourceLine(f_stderr, filename, lineno, 2, NULL, NULL); } error: |