title: Pluck in Python
body: <p>I started reading about <a href="http://documentcloud.github.com/underscore/" rel="noreferrer">underscore.js</a> today, it is a library for javascript that adds some functional programming goodies I'm used to using in Python. One pretty cool shorthand method is <a href="http://documentcloud.github.com/underscore/#pluck" rel="noreferrer">pluck</a>. </p>
  
  <p>Indeed in Python I often need to pluck out some specific attribute, and end up doing this:</p>
  
  <pre><code>users = [{
      "name" : "Bemmu",
      "uid" : "297200003"
  },
  {
      "name" : "Zuck",
      "uid" : "4"
  }]
  uids = map(lambda x:x["uid"], users)
  </code></pre>
  
  <p>If the underscore shorthand is somewhere in Python, this would be possible:</p>
  
  <pre><code>uids = pluck(users, "uid")
  </code></pre>
  
  <p><strong>It's of course trivial to add, but is that in Python somewhere already?</strong></p>