William Navaraj added the comment:
The variation in the caret position was also due to the trailing spaces. This
is now sorted in this solution with a factored out function to find out the
correct offset.
https://github.com/python/cpython/compare/main...williamnavaraj:fix-issue-46275?expand
William Navaraj added the comment:
Hi all,
Sorry. I seem to have stepped on someone's toes or no one likes turtle any more
(as this is active since 2016). As you can see, I am new here and still getting
a feel for these procedures. I was preparing a Jupyter notebook for my
studen
William Navaraj added the comment:
A potential solution or in that direction
https://github.com/williamnavaraj/cpython/tree/fix-issue-46275
Example 1:
```
temp=f"blank {foo)"
```
temp=f"blank {foo)"
^
SyntaxError: f-string: unmatched ')&
New submission from William Navaraj :
Currently for non-f-string syntax errors,
the caret points to the correct location of the syntax errors
Example 1:
```
a=foo)+foo()+foo()
```
a=foo)+foo()+foo()
^
SyntaxError: unmatched ')'
For f-string syntax errors,
the ca
William Navaraj added the comment:
@Eric Smith,Thanks for explaining the intuition behind this statement. I agree.
Just to avoid ambiguity we could add
"f-string: unmatched '%c' - no matching open parenthesis or missing '}'"
The only possibility at nested_
Change by William Navaraj :
--
nosy: +williamnavaraj
nosy_count: 6.0 -> 7.0
pull_requests: +28569
pull_request: https://github.com/python/cpython/pull/30355
___
Python tracker
<https://bugs.python.org/issu