def version(self, pretty=False, best=False):
versions = [<EOL>self.os_release_attr('<STR_LIT>'),<EOL>self.lsb_release_attr('<STR_LIT>'),<EOL>self.distro_release_attr('<STR_LIT>'),<EOL>self._parse_distro_release_content(<EOL>self.os_release_attr('<STR_LIT>')).get('<STR_LIT>', '<STR_LIT>'),<EOL>self._parse_distro_release_content(<EOL>self.lsb_release_attr('<STR_LIT:description>')).get('<STR_LIT>', '<STR_LIT>'),<EOL>self.uname_attr('<STR_LIT>')<EOL>]<EOL>version = '<STR_LIT>'<EOL>if best:<EOL><INDENT>for v in versions:<EOL><INDENT>if v.count("<STR_LIT:.>") > version.count("<STR_LIT:.>") or version == '<STR_LIT>':<EOL><INDENT>version = v<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for v in versions:<EOL><INDENT>if v != '<STR_LIT>':<EOL><INDENT>version = v<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if pretty and version and self.codename():<EOL><INDENT>version = u'<STR_LIT>'.format(version, self.codename())<EOL><DEDENT>return version<EOL>
Return the version of the OS distribution, as a string.

For details, see :func:`distro.version`.