Skip to content

Commit f99f33d

Browse files
committed
Merged revisions 85814 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line remove broken code accounting an offset the size of the line python#10186 ........
1 parent e395752 commit f99f33d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎Misc/NEWS‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Core and Builtins
1313
- Issue #10125: Don't segfault when the iterator passed to ``file.writelines()``
1414
closes the file.
1515

16+
- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
17+
of the offending line.
18+
1619
- Issue #9997: Don't let the name "top" have special significance in scope
1720
resolution.
1821

‎Python/pythonrun.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,6 @@ print_error_text(PyObject *f, int offset, const char *text)
10451045
{
10461046
char *nl;
10471047
if (offset >= 0) {
1048-
if (offset > 0 && offset == (int)strlen(text))
1049-
offset--;
10501048
for (;;) {
10511049
nl = strchr(text, '\n');
10521050
if (nl == NULL || nl-text >= offset)

0 commit comments

Comments
 (0)