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 eric.smith, larry, lukasz.langa
Date 2019-05-05.01:23:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org>
In-reply-to
Content
The walrus operator breaks f-strings, because the f-string scanner sees the colon as the end of the expression.

>>> x = '10'
>>> f'{x:=10}'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: '=' alignment not allowed in string format specifier

This becomes: format(x, '=10'), which is an error if x is a string.
History
Date User Action Args
2019-05-05 01:23:34eric.smithsetrecipients: + eric.smith, larry, lukasz.langa
2019-05-05 01:23:34eric.smithsetmessageid: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org>
2019-05-05 01:23:34eric.smithlinkissue36798 messages
2019-05-05 01:23:34eric.smithcreate