[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.
STINNER Victor
report at bugs.python.org
Wed Mar 18 00:41:00 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Comments about my own patches.
unicode_width.patch:
* error messages should be improved:
ValueError("Unable to compute string width") for Windows
IOError(strerror(errno)) otherwise
adjust_offset.patch:
* format_exception_only() from Lib/traceback.py may need a fix
* about the documentation: it looks like SyntaxError.offset unit is
not documentation in exceptions.rst (should it be documented, or
leaved unchanged?)
print_exception.patch:
* i'm not sure of the reference counts (ref leak?)
* in case of PyUnicode_FromUnicode(text, textlen) error,
>>PyFile_WriteObject(textobj, f, Py_PRINT_RAW);
PyFile_WriteString("\n", f);<< is used to display the line but textobj
may already ends with \n.
* format_exception_only() from Lib/traceback.py should do the same job
than fixed print_exception(): get the string width (to fix this
issue!)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2382>
_______________________________________
More information about the Python-bugs-list
mailing list