def cmp(cls, v1: 'VersionBase', v2: 'VersionBase') -> int:
        """ Compares two instances. """
        # TODO types checking
        if v1._version > v2._version:
            return 1
        elif v1._version == v2._version:
            return 0
        else:
            return -1
def cmp ( cls , v1 : 'VersionBase' , v2 : 'VersionBase' ) -> int : if v1 . _version > v2 . _version : return 1 elif v1 . _version == v2 . _version : return 0 else : return - 1
Compares two instances.