On 18/01/2022 20:41, Pablo Galindo Salgado wrote:
We cannot base the computation on a % because is possible that the location markers are relevant but the variables, function names or constructs are just very large. I think that the idea of "spawns
the whole line" is sensible, though.

On Tue, 18 Jan 2022 at 20:32, Steve Dower <steve.do...@python.org> wrote:


    Omitting the line of ^ where over x% (75%? 90%?) of characters on the
    line would be marked would be fine by me.

It would also need to take into account cases where a line contains an inline comment, which does not contribute to the code producing the error, but where all of the rest of the line (the code) is the source of the error and highlighting it is not useful

# test.py:

code_that_causes_an_error # a comment

$ python3.11 test.py

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    code_that_causes_an_error # a comment
    ^^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'code_that_causes_an_error' is not defined

(the traceback shown is from a current `main` build)
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/F4FSJY7OIPHAH5I6YBHCFI4DP3XLNUJW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to