On Fri, Apr 29, 2011 at 8:55 AM, Guido van Rossum <gu...@python.org> wrote: > Sorry, we'll have to make an exception for those of course. This will > somewhat complicate the interpretation of well-behaved, because those > are *not* well-behaved as far as containers go (both dict key lookup > and list membership are affected) but it is not a bug -- however it is > a bug to put these in containers and then use container comparisons on > the container.
That's a point in favour of the status quo, though - with the burden of enforcing reflexivity placed on the containers, types are free to make use of rich comparisons to return more than just simple True/False results. I hadn't really thought about it that way before this discussion - it is the identity checking behaviour of the builtin containers that lets us sensibly handle cases like sets of NumPy arrays. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com