

def __cmp__(self, other):
    if (other is None):
        return 1
    if (not isinstance(other, Version)):
        other = Version(other)
    for (ind, el) in enumerate(self.as_list):
        if ((ind + 1) > len(other.as_list)):
            return 1
        if ((not isinstance(el, int)) and isinstance(other.as_list[ind], int)):
            return (- 1)
        elif ((not isinstance(other.as_list[ind], int)) and isinstance(el, int)):
            return 1
        elif (el == other.as_list[ind]):
            continue
        elif (el > other.as_list[ind]):
            return 1
        else:
            return (- 1)
    if (len(other.as_list) > len(self.as_list)):
        return (- 1)
    else:
        return 0

dataset/ETHPy150Open conan-io/conan/conans/model/version.py Version.__cmp__/original