This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients SilentGhost, barry, emilyemorehouse, eric.smith, larry, lukasz.langa, scoder, serhiy.storchaka, xtreak
Date 2019-05-05.18:30:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557081018.72.0.0698804542806.issue36798@roundup.psfhosted.org>
In-reply-to
Content
Because of the backward compatibility issues, I'm not going to change the f-string parser for this. We'll just need to document the requirements for using parens if you want to use :=. This is similar to the existing documentation about lambdas and f-strings in https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals

Patches welcome!

To be clear: like lambdas, this is just limitation of embedding expressions inside strings, and it's also a limitation because format specs can start with equal signs. It's not a restriction because I think f-strings shouldn't contain "top-level" := expressions.
History
Date User Action Args
2019-05-05 18:30:18eric.smithsetrecipients: + eric.smith, barry, scoder, larry, SilentGhost, lukasz.langa, serhiy.storchaka, emilyemorehouse, xtreak
2019-05-05 18:30:18eric.smithsetmessageid: <1557081018.72.0.0698804542806.issue36798@roundup.psfhosted.org>
2019-05-05 18:30:18eric.smithlinkissue36798 messages
2019-05-05 18:30:18eric.smithcreate