Serhiy Storchaka <[email protected]> added the comment:
You can use it in parenthesis:
>>> f'{(x:=10)}'
'10'
It should be explicitly documented, that what looks like the assignment
operator is not always the assignment operator in f-strings.
>>> x = 10
>>> f'{x:=10}'
' 10'
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36798>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com