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

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QWCISJYDR6LYXOD4DAKUTA3EYV3XQQIM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to