diff options
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Python/pythonrun.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -13,6 +13,9 @@ Core and Builtins - Issue #10125: Don't segfault when the iterator passed to ``file.writelines()`` closes the file. +- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length + of the offending line. + - Issue #9997: Don't let the name "top" have special significance in scope resolution. diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7f63ae108c..f3b4e5044e 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1045,8 +1045,6 @@ print_error_text(PyObject *f, int offset, const char *text) { char *nl; if (offset >= 0) { - if (offset > 0 && offset == (int)strlen(text)) - offset--; for (;;) { nl = strchr(text, '\n'); if (nl == NULL || nl-text >= offset) |