Éric Araujo <mer...@netwok.org> added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10609> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com