def UINT(value):
 if (value is None):
  raise ValueError(u'None is not a valid integer')
 if (not value.isdigit()):
  raise ValueError(u'Only positive numbers are allowed')
 return int(value)

def UINT ( value ) : if ( value is None ) : raise ValueError ( u'None is not a valid integer' ) if ( not value . isdigit ( ) ) : raise ValueError ( u'Only positive numbers are allowed' ) return int ( value )
converts a value that matches d+ into an integer .