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

    Given a value, this function will test if it is string 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.
    """
    try:
        return isinstance(value, basestring)
    except TypeError:  # pragma: no cover
        return isinstance(value, str)
Test whether supplied parameter is a string.

    Given a value, this function will test if it is string 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 string.
Given a value, this function will test if it is string both on
Python 3 and Python 2.
Test whether supplied parameter is a string . Given a value this function will test if it is string both on Python 3 and Python 2 .
def is_str(value):
    try:
        return isinstance(value, basestring)
    except TypeError:  
        return isinstance(value, str)
def is_str ( value ) : try : return isinstance ( value , basestring ) except TypeError : return isinstance ( value , str )
Test whether supplied parameter is a string.
Test whether supplied parameter is a string .
"""Test whether supplied parameter is a string.

    Given a value, this function will test if it is string 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.
    """ # pragma: no cover
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 .