On 10/30/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Adam Olsen wrote: > > It'd be simpler still if we only had __cmp__ and __eq__. I just don't > > understand the use cases where that's not sufficient. > > > > Hrm. I guess set's subset checking requires more relationships than > > __cmp__ provides. > > Also, you might want to give the comparison operators meanings > that don't have anything to do with comparison in the usual > sense. The reason tp_richcmp was added in the first place was > so that arbitrary meanings could be given to the comparison > operators individually.
Yeah. It's clear to me that the opposition to removing __cmp__ comes down to "make the common things easy and the rare things possible". Removing __cmp__ means one of the common things (total ordering) becomes hard. __richcmp__ might solve that, but I'd like to see some larger examples first (involving unordered types, total ordered types, and partially ordered types.) -- Adam Olsen, aka Rhamphoryncus _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com