Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (17 sloc) 0.545 kB
from client import Client
VERSION = (0, 7, 2, 'final', 0)
def get_version(version=None):
"""
PEP386-compliant
"""
if version is None:
version = VERSION
assert len(version) == 5
assert version[3] in ("alpha", "beta", "rc", "final")
parts = 2 if version[2] == 0 else 3
main = ".".join(str(digit) for digit in version[:parts])
sub = ""
if version[3] != "final":
mapping = {"alpha": "a", "beta": "b", "rc": "rc"}
sub = mapping[version[3]] + str(version[4])
return main + sub
Jump to Line
Something went wrong with that request. Please try again.