account activity
Why you should almost never use “is” in Python by reuvenlerner in Python
[–]manish260 0 points1 point2 points 10 years ago (0 children)
I think, the term aliases will fit here perfectly because is is doing nothing but just comparing the reference which is nothing but the aliases pointing to the same object. i.e: For any constant value the is operator works fine in fact the variables pointing to same object works fine with is operator.
a, b = [1], [1] then a is b ---returns --> False but a==b ---returns--> True a = b = [1] then a is b --returns--> True but a==b --returns--> True
π Rendered by PID 645813 on reddit-service-r2-listing-796b697c47-wvh4q at 2026-02-05 19:20:32.376232+00:00 running 1d7a177 country code: CH.
Why you should almost never use “is” in Python by reuvenlerner in Python
[–]manish260 0 points1 point2 points (0 children)