Hacked By AnonymousFox

Current Path : /usr/lib64/python2.7/site-packages/Cheetah/
Upload File :
Current File : //usr/lib64/python2.7/site-packages/Cheetah/Version.py

Version = '3.2.3'
VersionTuple = (3, 2, 3, 'final', 0)

MinCompatibleVersion = '3.0.0a1'
MinCompatibleVersionTuple = (3, 0, 0, 'alpha', 1)

####


def convertVersionStringToTuple(s):
    versionNum = [0, 0, 0]
    releaseType = 'final'
    releaseTypeSubNum = 0
    if s.find('a') != -1:
        num, releaseTypeSubNum = s.split('a')
        releaseType = 'alpha'
    elif s.find('b') != -1:
        num, releaseTypeSubNum = s.split('b')
        releaseType = 'beta'
    elif s.find('rc') != -1:
        num, releaseTypeSubNum = s.split('rc')
        releaseType = 'candidate'
    else:
        num = s
    num = num.split('.')
    for i in range(len(num)):
        versionNum[i] = int(num[i])
    if len(versionNum) < 3:
        versionNum += [0]
    releaseTypeSubNum = int(releaseTypeSubNum)

    return tuple(versionNum + [releaseType, releaseTypeSubNum])


if __name__ == '__main__':
    c = convertVersionStringToTuple
    print(c('2.0a1'))
    print(c('2.0b1'))
    print(c('2.0rc1'))
    print(c('2.0'))
    print(c('2.0.2'))

    assert c('0.9.19b1') < c('0.9.19')
    assert c('0.9b1') < c('0.9.19')

    assert c('2.0a2') > c('2.0a1')
    assert c('2.0b1') > c('2.0a2')
    assert c('2.0b2') > c('2.0b1')
    assert c('2.0b2') == c('2.0b2')

    assert c('2.0rc1') > c('2.0b1')
    assert c('2.0rc2') > c('2.0rc1')
    assert c('2.0rc2') > c('2.0b1')

    assert c('2.0') > c('2.0a1')
    assert c('2.0') > c('2.0b1')
    assert c('2.0') > c('2.0rc1')
    assert c('2.0.1') > c('2.0')
    assert c('2.0rc1') > c('2.0b1')

Hacked By AnonymousFox1.0, Coded By AnonymousFox
Warning: unlink(/tmp/138.201.207.117:802): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/94.217.11.142:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1