I was playing around with Unicode identifiers and stumbled upon this:
>>> 𝑓, x = 1, 2
>>> 𝑓, x
(1, 2)
>>> 𝑓, f = 1, 2
>>> 𝑓, f
(2, 2)
What's going on here? Why does Python replace the object referenced by 𝑓
, but only sometimes? Where is that behavior described?
𝑓=1
f=2
print(𝑓)
– khelwood Jun 8 '20 at 6:18a, a = 1, 2; a, a
. This has nothing to do withf
or𝑓
. – user76284 Jun 9 '20 at 3:13𝑓 = 3; f
would suffice. – user76284 Jun 9 '20 at 3:15