New submission from chris.259263:

Trying to run a script with a bug in a formated string literal (in the example 
the ":" is missing) throws an "invalid syntax" error at the first expression of 
the script.


import math
a = "a"
b = f"{a>2s}"   # forgotten ":", should be f"{a:>2s}"

Running this script throws an "invalid syntax" error in the first line "import 

In a large program this behavior makes it nearly impossible to find the real 
bug in the program as the error message does not give any hint about the line 
or the type of the error in the program.

Using Python 3.6.2, IDLE 3.6.2 on Mac macOS Sierra (10.12.1)

messages: 299901
nosy: chris.259263
priority: normal
severity: normal
status: open
title: Insufficient error message with incorrect formated string literal
type: behavior
versions: Python 3.6

Python tracker <>
Python-bugs-list mailing list

Reply via email to