def how_long(length=4, choices=len(words), speed=1000 * 1000 * 1000 * 1000,
             optimism=2):
    """
    How long might it take to guess a password?

    @param length: the number of words that we're going to choose.
    @type length: L{int}

    @param choice: the number of words we might choose between.
    @type choice: L{int}

    @param speed: the speed of our hypothetical password guesser, in guesses
        per second.
    @type speed: L{int}

    @param optimism: When we start guessing all the options, we probably won't
        have to guess I{all} of them to get a hit.  This assumes that the
        guesser will have to guess only C{1/optimism} of the total number of
        possible options before it finds a hit.
    """
    return ((choices ** length) / (speed * optimism))
How long might it take to guess a password?

    @param length: the number of words that we're going to choose.
    @type length: L{int}

    @param choice: the number of words we might choose between.
    @type choice: L{int}

    @param speed: the speed of our hypothetical password guesser, in guesses
        per second.
    @type speed: L{int}

    @param optimism: When we start guessing all the options, we probably won't
        have to guess I{all} of them to get a hit.  This assumes that the
        guesser will have to guess only C{1/optimism} of the total number of
        possible options before it finds a hit.