def _convert_stringval(value):
 value = unicode(value)
 try:
  value = int(value)
 except (ValueError, TypeError):
  pass
 return value

def _convert_stringval ( value ) : value = unicode ( value ) try : value = int ( value ) except ( ValueError , TypeError ) : pass return value
converts a value to .