def replace(self, main_type=None, sub_type=None, params=None):
        """
        Return a new MimeType with new values for the specified fields.
        :param str main_type: The new main type.
        :param str sub_type: The new sub type.
        :param dict params: The new parameters.
        :return: A new instance of MimeType
        """
        if main_type is None:
            main_type = self.main_type

        if sub_type is None:
            sub_type = self.sub_type

        if params is None:
            params = self.params

        return MimeType(main_type, sub_type, params)
def replace ( self , main_type = None , sub_type = None , params = None ) : if main_type is None : main_type = self . main_type if sub_type is None : sub_type = self . sub_type if params is None : params = self . params return MimeType ( main_type , sub_type , params )
Return a new MimeType with new values for the specified fields.
        :param str main_type: The new main type.
        :param str sub_type: The new sub type.
        :param dict params: The new parameters.
        :return: A new instance of MimeType