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

23.1. SecIndex.__init__()

We want the secondary entries to sort on the variant name, not the current circle's name, but the latitude and longitude are the same as the primary circle.

cbchistlib.py
# - - -   S e c I n d e x . _ _ i n i t _ _

    def __init__(self, db, priIndex, variant, firstYear=MIN_YEAR,
                 lastYear=MAX_YEAR):
        '''Constructor.
        '''
        #-- 1
        # [ self  :=  a BaseIndex instance with db=(db) and
        #             circle=(circle) ]
        self.priIndex = priIndex
        self.variant = variant
        self.circle = priIndex.circle
        self.firstYear = firstYear
        self.lastYear = lastYear
        BaseIndex.__init__(self, db, variant, self.circle.lat,
                           self.circle.lon)