Next / Previous / Contents / Shipman's homepage

10.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.
# - - -   L o c . g e n G p s

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