All pastes #610749 Raw Edit

Unnamed

public python v1 · immutable
·published 2007-07-09 16:54 UTC
rendered paste body
import randomdef dummy(v):    return random.choice(v.keys())def test(func, values, ic):    output = {}    for i in xrange(ic):        result = func(values)        if output.has_key(result):            output[result] += 1        else:            output[result] = 1    return outputprint test(dummy, {"foo":2,"bar":3}, 1000)