def depth(cf):
    """
    Calculate the depth of a L{CharFun}.

    @return: Int
    @type cf: L{CharFun}
    """
    if True in cf.values():
        return 1
    else:
        key = cf.keys()[0]
        return 1+depth(cf[key])