def set_format(self, format): self.data.source = utils.replace_extension(self.filename, format) self.filename = self.data.source
def change_format(self, format): if self._has_format(): self.set_value(utils.replace_extension(self.name, format)) else: self.unresolve()