David Halter <davidhalte...@gmail.com> added the comment:

As I wrote before, I'm not trying to change anything about the f-string 
behavior. It is a refactoring. If anyone wants to change the behavior, I feel 
like they should probably write a PEP anyway.

I personally don't like that f-strings get parsed multiple times. It just 
smells bad. Also f-strings are IMO not just strings. They should maybe look 
like strings for other tools to parse them. But they are more or less 
statements that get executed.

The code in ast.c is not bad. Don't get me wrong. I just think that it's the 
wrong approach.

Regarding the edge cases: I don't think there are that many. In the end the ast 
output will look similar anyway. All the backslashes, string literals and 
comments can be checked and rejected in the tokenizer already.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to