def __mul__(self, other):
        r"""Scalar multiplication."""
        if isinstance(other, Vector3D):
            s = "Try methods dot or cross for scalar or vector products."
            raise TypeError(s)
        else:
            return other*self
def __mul__ ( self , other ) : if isinstance ( other , Vector3D ) : s = "Try methods dot or cross for scalar or vector products." raise TypeError ( s ) else : return other * self
r"""Scalar multiplication.