"Peter Maas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> This leads to the question: > > Why does (t1 == t2 => d[t1] identical to d[t2]) hold for user defined > objects and not for lists? My answer: because the cmp function looks at > id() for user defined objects and at list content for lists. Yes. > Why does the cmp function _have_ to look at lists contents? > My answer: because of the existence of list literals. No. The reason is that lists are containers, and it it is reasonable to define container equality recursively as element equality. There are no set literals, but that doesn't mean that set equality should be identity. -- http://mail.python.org/mailman/listinfo/python-list