Next / Previous / Contents / Shipman's homepage

7.4. Hier.lookupRankCode()

Returns the Rank instance with a given rank code; raises KeyError if there is no such rank.

xnomo3.py
# - - -   H i e r . l o o k u p R a n k C o d e   - - -

    def lookupRankCode ( self, rankCode ):
        """Find a rank by its code.
        """
        return self.__rankCodeMap [ rankCode ]