parameters: (ver)
return_statement: return ver
docstring: Converts a string, tuple or version number into an integer. The number is supposed to have at most 4 digits::
  
  		from waflib.Utils import num2ver
  		num2ver('1.3.2') == num2ver((1,3,2)) == num2ver((1,3,2,0))
  
  	:type ver: string or tuple of numbers
  	:param ver: a version number
docstring_summary: Converts a string, tuple or version number into an integer. The number is supposed to have at most 4 digits::
docstring_tokens: Converts a string tuple or version number into an integer . The number is supposed to have at most 4 digits ::
function: def num2ver(ver):
  	"""
  	Converts a string, tuple or version number into an integer. The number is supposed to have at most 4 digits::
  
  		from waflib.Utils import num2ver
  		num2ver('1.3.2') == num2ver((1,3,2)) == num2ver((1,3,2,0))
  
  	:type ver: string or tuple of numbers
  	:param ver: a version number
  	"""
  	if isinstance(ver, str):
  		ver = tuple(ver.split('.'))
  	if isinstance(ver, tuple):
  		ret = 0
  		for i in range(4):
  			if i < len(ver):
  				ret += 256**(3 - i) * int(ver[i])
  		return ret
  	return ver
function_tokens: def num2ver ( ver ) : if isinstance ( ver , str ) : ver = tuple ( ver . split ( '.' ) ) if isinstance ( ver , tuple ) : ret = 0 for i in range ( 4 ) : if i < len ( ver ) : ret += 256 ** ( 3 - i ) * int ( ver [ i ] ) return ret return ver