
Dec. 16, 2010
1:28 a.m.
Éric Araujo <merwok@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 <report@bugs.python.org> <http://bugs.python.org/issue10609> _______________________________________