def __setitem__(self, index, value):
        """Enable the '[] =' notation."""
        if not hasattr(value, 'tracks'):
            raise UnexpectedObjectError("Object '%s' is not expected. "
                    "Expecting a "
                    "mingus.containers.Composition object." % value)
        self.compositions[index] = value
def __setitem__ ( self , index , value ) : if not hasattr ( value , 'tracks' ) : raise UnexpectedObjectError ( "Object '%s' is not expected. " "Expecting a " "mingus.containers.Composition object." % value ) self . compositions [ index ] = value
Enable the '[] =' notation.