def _IsFinite(value):
 if (isinstance(value, float) and ((-1e309) < value < 1e309)):
  return True
 elif isinstance(value, (int, long)):
  return True
 else:
  return False

def _IsFinite ( value ) : if ( isinstance ( value , float ) and ( ( - 1e309 ) < value < 1e309 ) ) : return True elif isinstance ( value , ( int , long ) ) : return True else : return False
returns whether a value is a finite number .