Next / Previous / Contents / Shipman's homepage

9.3. Loc.genGps(): Generate waypoints

This method generates the GPS waypoints in a Loc instance as a sequence of Gps instances. Because these waypoints are stored in sequence in the .__gpsList attribute, we need only return an iterator that visits the elements of that list, because an iterator is also a generate that generates the values in the structure over which it is iterating.

birdnotes.py
# - - -   L o c . g e n G p s

    def genGps ( self ):
        """Generate the waypoints in self.
        """
        return  iter(self.__gpsList)