Next / Previous / Contents / Shipman's homepage

9.5. DaySummary.genLocs(): Generate all locations

birdnotes.py
# - - -   D a y S u m m a r y . g e n L o c s

    def genLocs(self):
        """Generate the locations in self.
        """

        #-- 1 --
        # [ codeList  :=  keys of self._locCodeMap, in ascending
        #                 order ]
        codeList = self._locCodeMap.keys()
        codeList.sort()

        #-- 2 --
        # [ generate values of self._locCodemap in order by
        #   codeList ]
        for  code in codeList:
            yield  self._locCodeMap[code]

        #-- 3 --
        raise StopIteration