]> granicus.if.org Git - python/commitdiff
SF 662923: iterator for dbm keys
authorRaymond Hettinger <python@rcn.com>
Sat, 28 Jun 2003 07:08:39 +0000 (07:08 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 28 Jun 2003 07:08:39 +0000 (07:08 +0000)
When shelve and the bsdbm where expanded to a full mapping interface,
this module was missed.

Lib/dumbdbm.py

index d0e1e31206bb5fcbf21c656de168e7f368bff3f7..2f6bc51dd915ead848b53fff7a159681483e6693 100644 (file)
@@ -23,6 +23,7 @@ is read when the database is opened, and some updates rewrite the whole index)
 
 import os as _os
 import __builtin__
+import UserDict
 
 _open = __builtin__.open
 
@@ -30,7 +31,7 @@ _BLOCKSIZE = 512
 
 error = IOError                         # For anydbm
 
-class _Database:
+class _Database(UserDict.DictMixin):
 
     def __init__(self, file, mode):
         self._mode = mode