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

28.11. CbcHist._rowKey(): What is the ._rowMap key for this census record?

The purpose of this method is to determine under what key in self._rowMap a given kind of bird is stored. It implements the row-key specification function defined in Section 14.3, “row-key. We need two things: a taxonomic key that sorts the rows into phylogenetic order, and an English name to serve as a secondary key.

Given a BirdId, we can get the taxonomic key from its .taxon attribute, and call its .engComma() method to get the English name.

cbchistlib.py
# - - -   C b c H i s t . _ r o w K e y

    def _rowKey(self, birdId):
        '''Find the key in the row map for a given census record.

          [ birdId is an abbrMod.birdId instance ->
              return row-key(birdId ]
        '''
        return (birdId.taxon.txKey, birdId.engComma())