Skip to main content

is_numeric_value

Checks if the provided value is a numeric type (int or float) while explicitly excluding boolean values.

def is_numeric_value(
value: any
) - > boolean

Determines if a given value is a strictly numeric type (integer or float) while excluding boolean values.

Parameters​

NameTypeDescription
valueanyThe input value to be checked for numeric type compatibility.

Returns​

TypeDescription
booleanTrue if the value is an instance of int or float and not a boolean; otherwise, False.