Next / Previous / Contents / Shipman's homepage

7.11. BigReport.genFiles(): Generate the report

This method generates the elements of .self.__bigList() in order. To print the report, the caller can just use a print statement on each returned value: that will convert it to a string and print it. Then we raise the special StopIteration exception to signify the end of generated values.
# - - -   B i g R e p o r t . g e n F i l e s   - - -

    def genFiles ( self ):
        """Generate the BigInfo objects in self.__bigList."""
        for  bigInfo in self.__bigList:
            yield bigInfo

        raise StopIteration