Message416069
When an empty expression is provided in curly brackets inside an f-string we get Syntax Error: "f-string: empty expression not allowed".
This is correct, however error with the same message is raised in the following cases: f"{!foo}", f"{!}", f"{:bar}", f"{=}", etc.
For example, should someone make an error and try to negate an expression with '!' instead of 'not' (i.e. f"{!True}"), they would get a confusing error, saying that the expression is empty, when it isn't.
I propose we raise an error with the message: "f-string: optional specifier '%c' must follow a non-empty expression. |
|
Date |
User |
Action |
Args |
2022-03-26 15:08:27 | macgors | set | recipients:
+ macgors, lys.nikolaou, pablogsal |
2022-03-26 15:08:27 | macgors | set | messageid: <1648307307.69.0.710442348209.issue47129@roundup.psfhosted.org> |
2022-03-26 15:08:27 | macgors | link | issue47129 messages |
2022-03-26 15:08:27 | macgors | create | |
|