Next / Previous / Contents / Shipman's homepage

7.6. Hier.__iter__()

Returns an iterator for self. In this case it steps through the ranks in self from root to deepest.

xnomo3.py
# - - -   H i e r . _ _ i t e r _ _   - - -

    def __iter__ ( self ):
        """Return self as an iterator.
        """
        for  rank in self.__rankList:
            yield rank