[New-bugs-announce] [issue35355] Some Errors involving formatted strings aren't reported in the right place.

Evan Newman report at bugs.python.org
Thu Nov 29 15:00:38 EST 2018


New submission from Evan Newman <evann7682 at gmail.com>:

Formatted strings seem to have some quirks.  
if you try putting in this, for example;
print(f'{0 0}')
; you get a syntax error, which is probably intended, but where the error is reported is not always accurate.  for example;
#just a comment, it doesn't matter what it says
print(f'{0 0}')
;will raise the syntax error, and highlight the j,u,and s in the comment!  that doesn't help, and makes it look like the comment is the error.  this is a real pain to debug if you hadn't known about this.  it took me about 2 hours to track down the problem.  seriously, this should be fixed.  I haven't tested the problem in any editor but idle, so the cause could be anywhere.  I was first using 3.7.0, I've just updated to 3.7.1 to make sure it still happens, and it does.

----------
assignee: terry.reedy
components: IDLE
files: recreation.py
messages: 330719
nosy: Enewman, terry.reedy
priority: normal
severity: normal
status: open
title: Some Errors involving  formatted strings aren't reported in the right place.
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file47959/recreation.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35355>
_______________________________________


More information about the New-bugs-announce mailing list