Python ValueError: too many values to unpack
<p>I am getting that exception from this code:</p>

<pre><code>class Transaction:
    def __init__ (self):
        self.materials = {}

    def add_material (self, m):
        self.materials[m.type + m.purity] = m

    def serialize (self):
        ser_str = 'transaction_start\n'

        for k, m in self.materials:
            ser_str += m.serialize ()

        sert += 'transaction_end\n'
        return ser_str
</code></pre>

<p>The <code>for</code> line is the one throwing the exception. The <code>m</code>s are <code>Material</code> objects. Anybody have any ideas why?</p>
