4 ms·
They obviously meant the second example: >>> print(f"{(a:=10)}")
by lyu07282 1y ago
They obviously meant the second example:
>>> print(f"{(a:=10)}")
- almostgotcaught 1y agothe output of the second example is "obvious" so i don't see the problem.
- pansa2 1y agoNeither of the examples is problematic on its own; it's the fact that the language supports both of them. They're very hard to distinguish at-a-glance yet behave entirely differently.