def __str__(self):
        """return a string representation of this version"""
        version = ".".join([str(e) for e in self.versiontuple])  # base version
        # epoch
        if self.epoch > 0:
            version = str(self.epoch) + "!" + version
        # release type
        if self.rtype is not None:
            version += "." + self.rtype
            if self.subversion > 0:
                version += str(self.subversion)
        # postrelease
        if self.is_postrelease:
            version += ".post"
            if self.postrelease > 0:
                version += str(self.postrelease)
        # devrelease
        if self.is_devrelease:
            version += ".dev"
            if self.devrelease > 0:
                version += str(self.devrelease)
        # done
        return version
return a string representation of this version
lib/libversion.py