[issue42623] Syntax Error showing pointer in wrong location

2020-12-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> @ Steven, did you mean to un-nosy Pratik?

No. I have tried to re-add him, but I think that because his user name 
is all digits, the bug tracker won't accept it.

When I try, I get this error:

Edit Error: user has no node 1051371

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42623] Syntax Error showing pointer in wrong location

2020-12-12 Thread E. Paine


E. Paine  added the comment:

While Tkinter could do it, I see no point in doing so. One thing that may be 
worth looking into is only allowing IDLE to use fixed-width fonts, but maybe 
this is just another of my crazy ideas... I think this can be safely closed 
unless someone wants to make a strong point for such changes.

@ Steven, did you mean to un-nosy Pratik?

--
nosy: +epaine

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42623] Syntax Error showing pointer in wrong location

2020-12-11 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The position of the caret assumes that every character in the string takes up 
the same width, measured in pixels. That is only true for monospaced fonts like 
Courier.

The only way to position the caret precisely with a proportional-width font is 
to compute the number of pixels for each character and then line up the caret 
at a position based on pixels rather than character columns. Unless Tkinter has 
functions to do both, it will probably be complicated and expensive, and I 
doubt anyone would care enough to do it.

--
nosy: +steven.daprano -1051371

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42623] Syntax Error showing pointer in wrong location

2020-12-11 Thread Pratik Palwai


New submission from Pratik Palwai <1051...@student.auhsd.us>:

When I get a syntax error, it shows the line with the error, and then a little 
'^' on the next line, showing where the error is. However, the location of the 
'^' is a little misleading, since it isn't in the right spot. For example (not 
sure if it will format correctly though):
elif self.left == None and self.right =! None:
  ^
The symbol should be under the +! instead of under the 'and.' Also, this 
problem doesn't occur with the font Courier.

--
assignee: terry.reedy
components: IDLE
messages: 382900
nosy: 1051371, terry.reedy
priority: normal
severity: normal
status: open
title: Syntax Error showing pointer in wrong location
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com