Next / Previous / Contents / Shipman's homepage

9.4. DaySummary.lookupLoc(): Find a location by its code

birdnotes.py
# - - -   D a y S u m m a r y . l o o k u p L o c

    def lookupLoc(self, locCode):
        """Lookup a location by its code.
        """
        #-- 1 --
        # [ if self has a location whose code matches locCode ->
        #     return the corresponding location as a Loc instance
        #   else -> raise KeyError ]
        return  self._locCodeMap [ locCode ]