This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients docs@python, eric.araujo, sandro.tosi
Date 2010-12-16.01:28:34
SpamBayes Score 0.0033579837
Marked as misclassified No
Message-id <1292462917.69.0.733007312539.issue10609@psf.upfronthosting.co.za>
In-reply-to
Content
IMO, wrapping db in a dict defeats the purpose of dbm implementing a mapping interface.  I would use the most natural mapping idioms:

-   for k, v in db.iteritems():
-       print(k, '\t', v)
+   for k in db:
+       print(k, '\t', db[k])

The downside of this example is that it does not explicitely call methods, making the comment about “Other dictionary methods” strange.
History
Date User Action Args
2010-12-16 01:28:37eric.araujosetrecipients: + eric.araujo, sandro.tosi, docs@python
2010-12-16 01:28:37eric.araujosetmessageid: <1292462917.69.0.733007312539.issue10609@psf.upfronthosting.co.za>
2010-12-16 01:28:35eric.araujolinkissue10609 messages
2010-12-16 01:28:35eric.araujocreate