News for hackers. Stuff that matters.
Re:An efficient way to make hash maps with insertion ordering by joshuamorton on Thursday July 01, 2021 @03:48PM (#27703721)
Note that this is an oversimplification, as

    p = Path('a.txt')
    q = Path('a.txt')

    p is q  # False
since p and q are different objects and "is" equality checks if the objects are the same (this can be interpreted approximately as "have the same memory address"), so it'll almost never be true. And in the cases where it is ( 2 is 2), you shouldn't rely on it, as most of them are optimizations.

There are no comments on this comment yet.