mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
SF patch #674396: Apply UserDict.DictMixin to expand dbshelve and dbojb
to have a full dictionary interface.
This commit is contained in:
parent
35ad641b99
commit
30a634e0a9
2 changed files with 4 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue