Message341413
| 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:34 | eric.smith | set | recipients: + eric.smith, larry, lukasz.langa |
| 2019-05-05 01:23:34 | eric.smith | set | messageid: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> |
| 2019-05-05 01:23:34 | eric.smith | link | issue36798 messages |
| 2019-05-05 01:23:34 | eric.smith | create | |