STINNER Victor <vstin...@python.org> added the comment:

I looked at the implementation. It's more complex than what I expected.

tb_displayline(): _Py_DisplaySourceLine() returns the source line with the 
indentation, but then it truncates the indentation. 

extract_anchors_from_line() includes the indentation if I understand correctly.

There is also a special case for trailing spaces. Like this code path:

        // If this is a multi-line expression, then we will highlight until
        // the last non-whitespace character.

There is also a funny part about bytes vs Unicode vs UTF-8, that I don't get.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45063>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to