
Sept. 20, 2021
9:34 a.m.
On 9/20/2021 11:21 AM, Terry Reedy wrote:
On 9/20/2021 8:46 AM, Serhiy Storchaka wrote:
20.09.21 14:18, Pablo Galindo Salgado пише:
* The parser will likely have "\n" characters and backslashes in f-strings expressions, which currently is impossible:
What about characters "\x7b", "\x7d", "\x5c", etc?
What about newlines in single quotes? Currently this works:
f'''{1 + 2}'''
But this does not:
f'{1 + 2}'
The later is an error with or without the 'f' prefix and I think that this should continue to be the case.
The thought is that anything that's within braces {} and is a valid expression should be allowed. Basically, the opening brace puts you in "parse expression" mode. Personally, I'd be okay with this particular change. Eric