Get the libconfig datatype of a value

    Return values: ``'d'`` (dict), ``'l'`` (list), ``'a'`` (array),
    ``'i'`` (integer), ``'i64'`` (long integer), ``'b'`` (bool),
    ``'f'`` (float), or ``'s'`` (string).

    Produces the proper type for LibconfList, LibconfArray, LibconfInt64
    instances.

def get_dump_type(value):
    '''Get the libconfig datatype of a value

    Return values: ``'d'`` (dict), ``'l'`` (list), ``'a'`` (array),
    ``'i'`` (integer), ``'i64'`` (long integer), ``'b'`` (bool),
    ``'f'`` (float), or ``'s'`` (string).

    Produces the proper type for LibconfList, LibconfArray, LibconfInt64
    instances.
    '''

    if isinstance(value, dict):
        return 'd'
    if isinstance(value, tuple):
        return 'l'
    if isinstance(value, list):
        return 'a'

    # Test bool before int since isinstance(True, int) == True.
    if isinstance(value, bool):
        return 'b'
    if isint(value):
        if is_long_int(value):
            return 'i64'
        else:
            return 'i'
    if isinstance(value, float):
        return 'f'
    if isstr(value):
        return 's'

    return None