Next / Previous / Contents / TCC Help System / NM Tech homepage

12.3. FormPhotoSet.genArchImages(): Generate contained photos

This method generates all our contained ArchImage instances. It uses the standard Python trick of setting up a dictionary key so that it sorts in the desired order. In our case, the order is descending order by area, with catalog number as a tiebreaker.

catweb
# - - -   F o r m P h o t o S e t . g e n A r c h I m a g e s

    def genArchImages(self):
        '''Generate contained images.
        '''
        #-- 1
        for key in sorted(self._sizeMap):
            yield self._sizeMap[key]