def __mul__(self, other):
        """Source Spectra can be multiplied, by constants or by
        SpectralElement objects.
        """
        # Multiplying by numeric constants is allowed
        if isinstance(other, (int, float)):
            other = UniformTransmission(other)
        # so is by SpectralElements. Otherwise, raise an exception.
        if not isinstance(other, SpectralElement):
            raise TypeError("SourceSpectrum objects can only be multiplied "
                            "by SpectralElement objects or constants; %s "
                            "type detected" % type(other))

        # Delegate the work of multiplying to CompositeSourceSpectrum
        return CompositeSourceSpectrum(self, other, 'multiply')
def __mul__ ( self , other ) : if isinstance ( other , ( int , float ) ) : other = UniformTransmission ( other ) if not isinstance ( other , SpectralElement ) : raise TypeError ( "SourceSpectrum objects can only be multiplied " "by SpectralElement objects or constants; %s " "type detected" % type ( other ) ) return CompositeSourceSpectrum ( self , other , 'multiply' )
Source Spectra can be multiplied, by constants or by
        SpectralElement objects.