Message124101
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. |
|
Date |
User |
Action |
Args |
2010-12-16 01:28:37 | eric.araujo | set | recipients:
+ eric.araujo, sandro.tosi, docs@python |
2010-12-16 01:28:37 | eric.araujo | set | messageid: <1292462917.69.0.733007312539.issue10609@psf.upfronthosting.co.za> |
2010-12-16 01:28:35 | eric.araujo | link | issue10609 messages |
2010-12-16 01:28:35 | eric.araujo | create | |
|