This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: bsddb has default flag of c, not r
Type: Stage:
Components: Documentation Versions: Python 2.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: akuchling, fdrake, kimbruning
Priority: normal Keywords:

Created on 2004-07-26 12:13 by kimbruning, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg21812 - (view) Author: kim bruning (kimbruning) Date: 2004-07-26 12:13
python 2.3.3 has a discrepancy with the documentation

In section:
> 7.13 bsddb -- Interface to Berkeley DB library

for hashopen, btopen and rnopen, the documentation
states that:

> The optional flag identifies the mode used to open
the file. It >may be "r" (read only, default)

It turns out that 'r' is in fact not the default option
for any of
these 3 in Python 2.3.3.
The default option for the flag parameter turns out to
be 'c'. I had
some trouble with using the bsddb module in conjunction
with make, and finally resorted to reading the source
code to find out what was wrong.

The actual source code has:

def hashopen(file, flag='c', mode=0666, pgsize=None,
ffactor=None, nelem=None,
            cachesize=None, lorder=None, hflags=0):

def btopen(file, flag='c', mode=0666,
            btflags=0, cachesize=None, maxkeypage=None,
            pgsize=None, lorder=None):

def rnopen(file, flag='c', mode=0666,
            rnflags=0, cachesize=None, pgsize=None,
            rlen=None, delim=None, source=None, pad=None):
msg21813 - (view) Author: kim bruning (kimbruning) Date: 2004-07-26 18:00
Logged In: YES 

Fred Drake has fixed this in the documentation source
msg21814 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-08-03 12:16
Logged In: YES 

Marking as closed.
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40645
2004-07-26 12:13:51kimbruningcreate