def key_of(d):
    """
    Returns the key of a single element dict.
    """
    if len(d) > 1 and not type(d) == dict():
        raise ValueError('key_of(d) may only except single element dict')
    else:
        return keys_of(d)[0]
def key_of ( d ) : if len ( d ) > 1 and not type ( d ) == dict ( ) : raise ValueError ( 'key_of(d) may only except single element dict' ) else : return keys_of ( d ) [ 0 ]
Returns the key of a single element dict.