def getname(name, exists):
    """return a unique name, using name as suffix

    exists is a function that will test existence
    """
    if not exists(name):
        return name
    else:
        return  go_up(name, exists, 1)
return a unique name, using name as suffix

    exists is a function that will test existence
    
recipes/Python/577934_Find_unique_name_based_prefix__digit_log2n_/recipe-577934.py