accounting/utils.py
def is_num(value):
    """Test whether supplied parameter is a number.

    Given a value, this function will test if it is number both on
    Python 3 and Python 2.

    Args:
        value (object): The value to test.

    Returns:
        True/False (bool): returns True if value is of type string, else False.
    """
    return(isinstance(value, int) or isinstance(value, float))
Test whether supplied parameter is a number.

    Given a value, this function will test if it is number both on
    Python 3 and Python 2.

    Args:
        value (object): The value to test.

    Returns:
        True/False (bool): returns True if value is of type string, else False.
    
Test whether supplied parameter is a number.
Given a value, this function will test if it is number both on
Python 3 and Python 2.
Test whether supplied parameter is a number . Given a value this function will test if it is number both on Python 3 and Python 2 .
def is_num(value):
    return(isinstance(value, int) or isinstance(value, float))
def is_num ( value ) : return ( isinstance ( value , int ) or isinstance ( value , float ) )
Test whether supplied parameter is a number.
Test whether supplied parameter is a number .
"""Test whether supplied parameter is a number.

    Given a value, this function will test if it is number both on
    Python 3 and Python 2.

    Args:
        value (object): The value to test.

    Returns:
        True/False (bool): returns True if value is of type string, else False.
    """
True/False (bool): returns True if value is of type string, else False.
True / False ( bool ) : returns True if value is of type string else False .
value
The value to test.
The value to test .