Returns string (supposed to be) shorter than str() and not contain newline

def one_liner_str(self):
        """Returns string (supposed to be) shorter than str() and not contain newline"""
        assert self.less_attrs is not None, "Forgot to set attrs class variable"
        s_format = "{}={}"
        s = "; ".join([s_format.format(x, self.__getattribute__(x)) for x in self.less_attrs])
        return s