<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
On this page (about module dbm in Python 3.1):<br>http://docs.python.org/py3k/library/dbm.html<br><br>In this code sample:<br><pre><span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">db</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span><br><br>iteritems is no longer supported in Python 3.1.  This is documented here: <br>http://docs.python.org/py3k/whatsnew/3.0.html<br><br>"Also, the <tt class="xref docutils literal"><span class="pre">dict.iterkeys()</span></tt>, <tt class="xref docutils literal"><span class="pre">dict.iteritems()</span></tt> and<br><tt class="xref docutils literal"><span class="pre">dict.itervalues()</span></tt> methods are no longer supported."<br><br>I suggest to change the following:<br><br>Old: <br><span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">db</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span><br><br>New:<br>for k, v in db.items():<br><br>I'm pretty new to Python so you should double check, but I have tested this myself on version 3.1.3.<br><br>Regards,<br><br>Sébastien<br><br><br><br><br><br></pre><br>                                               </body>
</html>