def _versionTuple(versionStr):
 try:
  v = (versionStr.strip('.') + '.0.0.0').split('.')[:3]
 except (AttributeError, ValueError):
  raise ValueError('Bad version string: `{}`'.format(versionStr))
 return (int(v[0]), int(v[1]), int(v[2]))

def _versionTuple ( versionStr ) : try : v = ( versionStr . strip ( '.' ) + '.0.0.0' ) . split ( '.' ) [ : 3 ] except ( AttributeError , ValueError ) : raise ValueError ( 'Bad version string: `{}`' . format ( versionStr ) ) return ( int ( v [ 0 ] ) , int ( v [ 1 ] ) , int ( v [ 2 ] ) )
returns a tuple of ints from a string version 1 .