mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
#9397: remove mention of dbm.bsd which does not exist anymore.
This commit is contained in:
parent
8a1caa2361
commit
1cec3e367c
1 changed files with 6 additions and 15 deletions
|
@ -5,12 +5,11 @@ Use
|
||||||
import dbm
|
import dbm
|
||||||
d = dbm.open(file, 'w', 0o666)
|
d = dbm.open(file, 'w', 0o666)
|
||||||
|
|
||||||
The returned object is a dbm.bsd, dbm.gnu, dbm.ndbm or dbm.dumb
|
The returned object is a dbm.gnu, dbm.ndbm or dbm.dumb object, dependent on the
|
||||||
object, dependent on the type of database being opened (determined by
|
type of database being opened (determined by the whichdb function) in the case
|
||||||
the whichdb function) in the case of an existing dbm. If the dbm does
|
of an existing dbm. If the dbm does not exist and the create or new flag ('c'
|
||||||
not exist and the create or new flag ('c' or 'n') was specified, the
|
or 'n') was specified, the dbm type will be determined by the availability of
|
||||||
dbm type will be determined by the availability of the modules (tested
|
the modules (tested in the above order).
|
||||||
in the above order).
|
|
||||||
|
|
||||||
It has the following interface (key and data are strings):
|
It has the following interface (key and data are strings):
|
||||||
|
|
||||||
|
@ -47,7 +46,7 @@ import sys
|
||||||
class error(Exception):
|
class error(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
_names = ['dbm.bsd', 'dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
|
_names = ['dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
|
||||||
_defaultmod = None
|
_defaultmod = None
|
||||||
_modules = {}
|
_modules = {}
|
||||||
|
|
||||||
|
@ -168,10 +167,6 @@ def whichdb(filename):
|
||||||
if magic == 0x13579ace:
|
if magic == 0x13579ace:
|
||||||
return "dbm.gnu"
|
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
|
# Later versions of Berkeley db hash file have a 12-byte pad in
|
||||||
# front of the file type
|
# front of the file type
|
||||||
try:
|
try:
|
||||||
|
@ -179,10 +174,6 @@ def whichdb(filename):
|
||||||
except struct.error:
|
except struct.error:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
## Check for BSD hash
|
|
||||||
#if magic in (0x00061561, 0x61150600):
|
|
||||||
# return "dbm.bsd"
|
|
||||||
|
|
||||||
# Unknown
|
# Unknown
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue