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

The parens are added in fstring_compile_expr at 
https://github.com/python/cpython/blob/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4/Parser/string_parser.c#L391

I don't recall if this is really only a "skip leading whitespace" problem, or 
if there's some other reason they're required. If it's just a whitespace issue, 
maybe skipping leading whitespace in fstring_compile_expr is a better idea? One 
of the reasons I originally didn't want to skip leading whitespace is because I 
didn't want to add yet another place where we'd have to maintain a "what 
qualifies as whitespace to the compiler?" decision.

----------

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

Reply via email to