def _intOrDefault(value, default=None):
 if value:
  try:
   return int(value)
  except (TypeError, ValueError):
   pass
 return default

def _intOrDefault ( value , default = None ) : if value : try : return int ( value ) except ( TypeError , ValueError ) : pass return default
convert a value to an integer if possible .