(self, other)
return (self.items() < other.items())
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
        >>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
        >>> c < d
        True
        >>> d < c
        False
        >>> d < dict(c)
        Traceback (most recent call last):
        TypeError: Can only compare with other OrderedDicts
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
        >>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
        >>> c < d
        True
        >>> d < c
        False
        >>> d < dict(c)
        Traceback (most recent call last):
        TypeError: Can only compare with other OrderedDicts
>>> d = OrderedDict ((( 1 3 ) ( 3 2 ) ( 2 1 ))) >>> c = OrderedDict ((( 0 3 ) ( 3 2 ) ( 2 1 ))) >>> c < d True >>> d < c False >>> d < dict ( c ) Traceback ( most recent call last ) : TypeError : Can only compare with other OrderedDicts
def __lt__(self, other):
        """
        >>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
        >>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
        >>> c < d
        True
        >>> d < c
        False
        >>> d < dict(c)
        Traceback (most recent call last):
        TypeError: Can only compare with other OrderedDicts
        """
        if not isinstance(other, OrderedDict):
            raise TypeError('Can only compare with other OrderedDicts')
        # FIXME: efficiency?
        #   Generate both item lists for each compare
        return (self.items() < other.items())
def __lt__ ( self , other ) : if not isinstance ( other , OrderedDict ) : raise TypeError ( 'Can only compare with other OrderedDicts' ) # FIXME: efficiency? #   Generate both item lists for each compare return ( self . items ( ) < other . items ( ) )