def version_triple ( tag ) : groups = re . match ( r'v?(\d+)\.(\d+)\.(\d+)' , tag ) . groups ( ) return tuple ( int ( n ) for n in groups )
extract numbers from tuple python
returns : a triple of integers from a version tag
def version_triple(tag):
    """
    returns: a triple of integers from a version tag
    """
    groups = re.match(r'v?(\d+)\.(\d+)\.(\d+)', tag).groups()
    return tuple(int(n) for n in groups)