def _strtobool(val):
 val = val.lower()
 if (val in ('y', 'yes', 't', 'true', 'on', '1')):
  return 1
 elif (val in ('n', 'no', 'f', 'false', 'off', '0')):
  return 0
 else:
  raise ValueError(('invalid truth value %r' % (val,)))

def _strtobool ( val ) : val = val . lower ( ) if ( val in ( 'y' , 'yes' , 't' , 'true' , 'on' , '1' ) ) : return 1 elif ( val in ( 'n' , 'no' , 'f' , 'false' , 'off' , '0' ) ) : return 0 else : raise ValueError ( ( 'invalid truth value %r' % ( val , ) ) )
convert a string representation of truth to true (1) or false (0) .