mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -16,6 +16,7 @@
|
|||
#
|
||||
|
||||
import db
|
||||
from UserDict import DictMixin
|
||||
|
||||
class DBEnv:
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -85,7 +86,7 @@ class DBEnv:
|
|||
return apply(self._cobj.set_encrypt, args, kwargs)
|
||||
|
||||
|
||||
class DB:
|
||||
class DB(DictMixin):
|
||||
def __init__(self, dbenv, *args, **kwargs):
|
||||
# give it the proper DBEnv C object that its expecting
|
||||
self._cobj = apply(db.DB, (dbenv._cobj,) + args, kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue