title: PySpark function behaving different between mapValues and filter
body: <p>I'm working in spark using pyspark.  I have an rdd that is of the format <code>[(key, (num, (min, max, count))),....]</code> when I use the lambda below </p>
  
  <pre><code>t = fullBids.filter(lambda (value, stats): (stats[2] &gt; 10 and stats[0] &lt; value and value &lt; stats[1]))
  </code></pre>
  
  <p>it errors out with </p>
  
  <pre><code>tuple index out of range
  </code></pre>
  
  <p>but when I use it in a mapValues call it runs successfully, returning either True or False correctly.</p>
  
  <pre><code>ti = fullBids.mapValues(lambda (value, stats): (stats[2] &gt; 10 and stats[0] &lt; value and value &lt; stats[1]))
  </code></pre>
  
  <p>I would expect the filter to work, but it isn't. Can someone explain what I'm missing here? </p>