Next / Previous / Contents / Shipman's homepage

8.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