Next / Previous / Contents / TCC Help System / NM Tech homepage

21.2. BaseIndex.__cmp__(): Comparator

cbchistlib.py
# - - -   B a s e I n d e x . _ _ c m p _ _

    def __cmp__(self, other):
        '''Ordinary comparison function: ascending by circle name.
        '''
        return cmp(
            (self.cir_name, self.lat, self.lon),
            (other.cir_name, other.lat, other.lon))