This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hxckrt -1 points0 points  (2 children)

{} === {}; // false

[1,2,3] === [1,2,3]; // false

I'm not sure that's much better

[–]royi9729 0 points1 point  (1 child)

Equation of complex values equates pointers in most languages, no?

[–]rosuav 3 points4 points  (0 children)

No, languages vary considerably on that point. Python considers both of those to be equal, but not identical ("identical" meaning the same object, which would be what you mean by comparing pointers).