Next / Previous / Contents / Shipman's homepage

21.3. YearCollection.__getitem__(): Return self[yyyy]

This method implements the index ([...]) operation on a YearCollection. If there is no such year, it will raise KeyError.

noteweb
# - - -   Y e a r C o l l e c t i o n . _ _ g e t i t e m _ _

    def __getitem__ ( self, yyyy ):
        '''Implements self[yyyy]
        '''
        return self.__yearMap[yyyy]