> 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. Abandoning that feature probably isn't an option, > so nevermind me. > > (Although, if we really wanted we could use -2/+2 to mean > subset/superset, while -1/+1 mean smaller/larger.)
It's the difference between partial and total order. Some things have only a partial order, so they can't implement __cmp__; or __cmp__ would have to be extended to support "unordered" as a result. Regards, Martin _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
