grayjk · GitHub

Bug report

Bug description:

The column marker/caret offset does not appear to account for characters with a display width of two.

Does not appear to be REPL related. The SyntaxError output is the same when running python test.py

Current behavior

>>> 女女女=1; 女女女/
  File "<python-input-0>", line 1
    女女女=1; 女女女/
               ^
SyntaxError: invalid syntax

The column marker/caret does not point to the column after the /

Expected behavior

>>> 女女女=1; 女女女/
  File "<python-input-0>", line 1
    女女女=1; 女女女/
                   ^
SyntaxError: invalid syntax

The column marker/caret points to the column after the /

CPython versions tested on:

3.14.1, 3.15.0a2

Operating systems tested on:

Linux

Linked PRs

Read the original on github.com ↗