title: How to pass a dictionary as value to a function in python
body: <p>In python, I am using the mincemeat map-reduce framework</p>
  
  <p>From my map function I would like to <code>yield (k,v)</code> in a loop, which would send the output to the reduce function (sample data given which is the output of my map function )</p>
  
  <pre><code>auth3 {'practical': 1, 'volume': 1, 'physics': 1} 
  auth34 {'practical': 1, 'volume': 1, 'chemistry': 1}
  ....
  </code></pre>
  
  <p>There would be many such entries; this is just a few as an example.</p>
  
  <p>Here, <code>auth3</code> and <code>auth34</code> are keys and the respective values are dictionary items</p>
  
  <p>Inside the reduce function when I try to print the key,values, I am getting "too many values to unpack" error. My reduce function looks like this</p>
  
  <pre><code>def reducefn(k, v):     
      for k,val in (k,v):
          print k, v
  </code></pre>
  
  <p>Please let me know how to resolve this error.</p>