Eric V. Smith <e...@trueblade.com> added the comment:

Yes, moving f-strings to the grammar would be a huge change, and not just for 
CPython.

I discussed it at the last PyCon with the authors of various editors (for 
syntax highlighting) and other tools that parse python code. No one was hugely 
opposed to it, and I think even one person was very excited about it. But it's 
not a step to be taken lightly. I don't think I've discussed it with any other 
Python implementors outside of CPython.

My biggest concern is that it makes naive string recognition fail. For example, 
this would become a valid f-string:
f'{fn('some string')}'
while
'{fn('some string')}'
is not a valid string.

I now I think I've completely derailed this bug report. I think the action item 
here is for me to finish up my better error reporting.

----------

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

Reply via email to