Re:Fstrings.wtf
by almostgotcaught on Saturday July 19, 2025 @11:48AM
(#44616509)
this has nothing to do with the walrus operator and everything to do with how string.format works in python https://docs.python.org/3/library/string.html#format-string-...
[ Parent
| on HN ]
They obviously meant the second example:
>>> print(f"{(a:=10)}")
Re:Fstrings.wtf
by almostgotcaught on Saturday July 19, 2025 @01:22PM
(#44617395)
the output of the second example is "obvious" so i don't see the problem.