Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1cec3e36
Commit
1cec3e36
authored
Jul 29, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#9397: remove mention of dbm.bsd which does not exist anymore.
parent
8a1caa23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
Lib/dbm/__init__.py
Lib/dbm/__init__.py
+6
-15
No files found.
Lib/dbm/__init__.py
View file @
1cec3e36
...
...
@@ -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
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment