summaryrefslogtreecommitdiffstats
path: root/Lib/dbm/__init__.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-07-29 16:26:56 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-07-29 16:26:56 (GMT)
commit1cec3e367c4cdead47eff7ec1f3d65c342daf92f (patch)
tree7de60744f1a5fad43ce5baf7a18668035b479402 /Lib/dbm/__init__.py
parent8a1caa2361b86baeadfe5343b0c74fe9dec2a4ce (diff)
downloadcpython-1cec3e367c4cdead47eff7ec1f3d65c342daf92f.zip
cpython-1cec3e367c4cdead47eff7ec1f3d65c342daf92f.tar.gz
cpython-1cec3e367c4cdead47eff7ec1f3d65c342daf92f.tar.bz2
#9397: remove mention of dbm.bsd which does not exist anymore.
Diffstat (limited to 'Lib/dbm/__init__.py')
-rw-r--r--Lib/dbm/__init__.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py
index add6626..b2a254a 100644
--- a/Lib/dbm/__init__.py
+++ b/Lib/dbm/__init__.py
@@ -5,12 +5,11 @@ Use
import dbm
d = dbm.open(file, 'w', 0o666)
-The returned object is a dbm.bsd, dbm.gnu, dbm.ndbm or dbm.dumb
-object, dependent on the type of database being opened (determined by
-the whichdb function) in the case of an existing dbm. If the dbm does
-not exist and the create or new flag ('c' or 'n') was specified, the
-dbm type will be determined by the availability of the modules (tested
-in the above order).
+The returned object is a dbm.gnu, dbm.ndbm or dbm.dumb object, dependent on the
+type of database being opened (determined by the whichdb function) in the case
+of an existing dbm. If the dbm does not exist and the create or new flag ('c'
+or 'n') was specified, the dbm type will be determined by the availability of
+the modules (tested in the above order).
It has the following interface (key and data are strings):
@@ -47,7 +46,7 @@ import sys
class error(Exception):
pass
-_names = ['dbm.bsd', 'dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
+_names = ['dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
_defaultmod = None
_modules = {}
@@ -168,10 +167,6 @@ def whichdb(filename):
if magic == 0x13579ace:
return "dbm.gnu"
- ## Check for old Berkeley db hash file format v2
- #if magic in (0x00061561, 0x61150600):
- # return "bsddb185" # not supported anymore
-
# Later versions of Berkeley db hash file have a 12-byte pad in
# front of the file type
try:
@@ -179,10 +174,6 @@ def whichdb(filename):
except struct.error:
return ""
- ## Check for BSD hash
- #if magic in (0x00061561, 0x61150600):
- # return "dbm.bsd"
-
# Unknown
return ""