Is there a more pythonic way of writing the following maximum-value function:
<pre><code>def greatest(values):
    value_generator = (v for k,v in values)
    max_value = max(value_generator)
    return (k for k,v in values if v == max_value)

sample_data = ( ('id1', 3), ('id2', 5), ('id3', 5) )
items = list( greatest(sample_data) ) # Should produce ['id2', 'id3']
</code></pre>

<p>MapReduce anyone?</p>
