def _CheckNumber(value, name, should_be_finite=False):
 if (not isinstance(value, (int, long, float))):
  raise TypeError(('%s must be a int, long or float, got %s' % (name, value.__class__.__name__)))
 if (should_be_finite and (not _IsFinite(value))):
  raise ValueError(('%s must be a finite value (got %f)' % (name, value)))
 return value

def _CheckNumber ( value , name , should_be_finite = False ) : if ( not isinstance ( value , ( int , long , float ) ) ) : raise TypeError ( ( '%s must be a int, long or float, got %s' % ( name , value . __class__ . __name__ ) ) ) if ( should_be_finite and ( not _IsFinite ( value ) ) ) : raise ValueError ( ( '%s must be a finite value (got %f)' % ( name , value ) ) ) return value
checks whether value is a number .