Next / Previous / Contents / Shipman's homepage

9.2. DaySummary.defaultLoc(): Return the default location

This method returns the Loc instance corresponding to the default location code. See Section 9.4, “DaySummary.lookupLoc(): Find a location by its code”.

birdnotes.py
# - - -   D a y S u m m a r y . d e f a u l t L o c

    def defaultLoc(self):
        """Return self's default location.
        """
        #-- 1 --
        # [ if self.defaultLocCode is a valid location code in
        #   self ->
        #     return the corresponding Loc instance
        #   else -> raise KeyError ]
        return  self.lookupLoc(self.defaultLocCode)