Next / Previous / Contents / Shipman's homepage

18.4. Narrative.__getitem__(): Get one paragraph

Gets the Kth contained paragraph. May raise KeyError.

birdnotes.py
# - - -   N a r r a t i v e . _ _ g e t i t e m _ _

    def __getitem__(self, k):
        """Get one paragraph.
        """
        return  self._paraList[k]