summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/dbshelve.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-02-05 04:12:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-02-05 04:12:41 (GMT)
commit30a634e0a983f470e3663f93e182faed2128bbd9 (patch)
treeaec92acb2bb5d051bb38a187f36ce2b195c0b094 /Lib/bsddb/dbshelve.py
parent35ad641b9931691d2b0371ee3a6fb57b59256dbd (diff)
downloadcpython-30a634e0a983f470e3663f93e182faed2128bbd9.zip
cpython-30a634e0a983f470e3663f93e182faed2128bbd9.tar.gz
cpython-30a634e0a983f470e3663f93e182faed2128bbd9.tar.bz2
SF patch #674396: Apply UserDict.DictMixin to expand dbshelve and dbojb
to have a full dictionary interface.
Diffstat (limited to 'Lib/bsddb/dbshelve.py')
-rw-r--r--Lib/bsddb/dbshelve.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/bsddb/dbshelve.py b/Lib/bsddb/dbshelve.py
index d466361..34dc607 100644
--- a/Lib/bsddb/dbshelve.py
+++ b/Lib/bsddb/dbshelve.py
@@ -30,6 +30,7 @@ storage.
#------------------------------------------------------------------------
import cPickle
+from UserDict import DictMixin
try:
# For Python 2.3
from bsddb import db
@@ -75,7 +76,7 @@ def open(filename, flags=db.DB_CREATE, mode=0660, filetype=db.DB_HASH,
#---------------------------------------------------------------------------
-class DBShelf:
+class DBShelf(DictMixin):
"""
A shelf to hold pickled objects, built upon a bsddb DB object. It
automatically pickles/unpickles data objects going to/from the DB.