Next / Previous / Contents / Shipman's homepage

7.5. Hier.__getItem__()

This special method is called when a Hier instance H is indexed as Hier[n].

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

    def __getitem__ ( self, n ):
        """Return the nth rank in self.
        """
        return self.__rankList[n]