One obscure detail of the implementation of list equality: In Python an object can be unequal to itself: >>> class A: ... def __eq__(self, other): return False ... >>> a = A() >>> a == a False However, the list assumes that (a is a) implies a == a, so >>> [a] == [a] True