Was some thought given to providing a mixin for boolean inequalities in total orderings (define __le__ and get the rest for free)?
One of the motivating examples in the ABC pep was that the presence of __getitem__ was insufficient to distinguish between a sequence and a mapping. By registering one of the collections ABCs, a class can make an affirmative declaration that it is either a mapping or a sequence. It seems that there is a similar issue with inequalities. If something defines __le__, you don't necessarily know whether it returns a boolean (it could return an array of bools for a vector comparison). Even if a bool is returned, it is not clear whether it implies sortable ordering or whether is something with a completely different meaning (i.e. set.issubset). Raymond _______________________________________________ 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
