def _config_to_python(v):
 if (v in (u'true', u'yes')):
  v = True
 elif (v in (u'false', u'no')):
  v = False
 else:
  try:
   v = int(v)
  except ValueError:
   pass
 return v

def _config_to_python ( v ) : if ( v in ( u'true' , u'yes' ) ) : v = True elif ( v in ( u'false' , u'no' ) ) : v = False else : try : v = int ( v ) except ValueError : pass return v
convert a git config string into a python value .