Message299901
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.
Example:
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 math".
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) |
|
Date |
User |
Action |
Args |
2017-08-08 08:55:58 | chris.259263 | set | recipients:
+ chris.259263 |
2017-08-08 08:55:58 | chris.259263 | set | messageid: <1502182558.08.0.700048111188.issue31140@psf.upfronthosting.co.za> |
2017-08-08 08:55:57 | chris.259263 | link | issue31140 messages |
2017-08-08 08:55:57 | chris.259263 | create | |
|