FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

#9397: remove mention of dbm.bsd which does not exist anymore. · python/cpython@1cec3e3 · GitHub

Repository navigation

Commit 1cec3e3

Browse files
Victor Stinner
committed
#9397: remove mention of dbm.bsd which does not exist anymore.
1 parent 8a1caa2 commit 1cec3e3

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

‎Lib/dbm/__init__.py‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
import dbm
66
d = dbm.open(file, 'w', 0o666)
77
8-
The returned object is a dbm.bsd, dbm.gnu, dbm.ndbm or dbm.dumb
9-
object, dependent on the type of database being opened (determined by
10-
the whichdb function) in the case of an existing dbm. If the dbm does
11-
not exist and the create or new flag ('c' or 'n') was specified, the
12-
dbm type will be determined by the availability of the modules (tested
13-
in the above order).
8+
The returned object is a dbm.gnu, dbm.ndbm or dbm.dumb object, dependent on the
9+
type of database being opened (determined by the whichdb function) in the case
10+
of an existing dbm. If the dbm does not exist and the create or new flag ('c'
11+
or 'n') was specified, the dbm type will be determined by the availability of
12+
the modules (tested in the above order).
1413
1514
It has the following interface (key and data are strings):
1615
@@ -47,7 +46,7 @@
4746
class error(Exception):
4847
pass
4948

50-
_names = ['dbm.bsd', 'dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
49+
_names = ['dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
5150
_defaultmod = None
5251
_modules = {}
5352

@@ -168,21 +167,13 @@ def whichdb(filename):
168167
if magic == 0x13579ace:
169168
return "dbm.gnu"
170169

171-
## Check for old Berkeley db hash file format v2
172-
#if magic in (0x00061561, 0x61150600):
173-
# return "bsddb185" # not supported anymore
174-
175170
# Later versions of Berkeley db hash file have a 12-byte pad in
176171
# front of the file type
177172
try:
178173
(magic,) = struct.unpack("=l", s16[-4:])
179174
except struct.error:
180175
return ""
181176

182-
## Check for BSD hash
183-
#if magic in (0x00061561, 0x61150600):
184-
# return "dbm.bsd"
185-
186177
# Unknown
187178
return ""
188179

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL