>> Was some thought given to providing a mixin for boolean 
>> inequalities in total orderings (define __le__ and get 
>> the rest for free)

[GvR]
> IOW it's messy. 

Would it make sense to do something in numbers.py modeled
after Exact/InExact?  Those don't have any behavior; they
just make a statement about semantics.


Raymond


---------------------------
class TotalOrdering(object):
    '''Equality and inequality operations on this type are guaranteed to
    return boolean values and to imply a total ordering where the relations
    are transitive (a<b and b<c implies a<c) and the operators have the
    usual interrelationships:  (a<b) == (b>a) == (not a>=b) == (not b<=a).
    '''
    @abstractmethod
    def __eq__(self, other): pass

    @abstractmethod
    def __ne__(self, other): pass
    
    @abstractmethod
    def __lt__(self, other): pass

    @abstractmethod
    def __le__(self, other): pass

    @abstractmethod
    def __gt__(self, other): pass

    @abstractmethod
    def __ge__(self, other): pass
_______________________________________________
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

Reply via email to