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, serhiy.storchaka, xtreak
Date 2019-05-05.14:32:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557066725.85.0.638793360369.issue36798@roundup.psfhosted.org>
In-reply-to
Content
The fact that adding := support could break existing working code does give me pause to make any change here, and does suggest that a deprecation period would be needed in order to modify the f-string expression scanning behavior.

One concern I have is that if something akin to PEP 536 is used to implement f-strings, then it would require some work (but not be impossible) to avoid allowing :=.

In 3.8, := is prohibited in "expression as a statement" mode, but that's not the mode that f-strings expressions operate in: they're just normal expressions, and I would normally just expect := to work. But the backward compatibility break here is the reason to possibly disallow supporting :=, not that := should just never work in f-strings without parens.
History
Date User Action Args
2019-05-05 14:32:05eric.smithsetrecipients: + eric.smith, barry, larry, SilentGhost, lukasz.langa, serhiy.storchaka, emilyemorehouse, xtreak
2019-05-05 14:32:05eric.smithsetmessageid: <1557066725.85.0.638793360369.issue36798@roundup.psfhosted.org>
2019-05-05 14:32:05eric.smithlinkissue36798 messages
2019-05-05 14:32:05eric.smithcreate