From: Martin v. Löwis Date: Tue, 5 Jun 2001 05:33:19 +0000 (+0000) Subject: Fix bug #422702: Make flag argument to open optional, and document it that way. X-Git-Tag: v2.2a3~1614 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e24fef0dd243fc896bfe1947cd638e225e7361c5;p=thirdparty%2FPython%2Fcpython.git Fix bug #422702: Make flag argument to open optional, and document it that way. --- diff --git a/Doc/lib/libdbhash.tex b/Doc/lib/libdbhash.tex index 61b01639fd91..d3ed0da5914a 100644 --- a/Doc/lib/libdbhash.tex +++ b/Doc/lib/libdbhash.tex @@ -21,7 +21,7 @@ This module provides an exception and a function: \exception{KeyError}. It is a synonym for \exception{bsddb.error}. \end{excdesc} -\begin{funcdesc}{open}{path, flag\optional{, mode}} +\begin{funcdesc}{open}{path, \optional{, flag\optional{, mode}}} Open a \code{db} database and return the database object. The \var{path} argument is the name of the database file. diff --git a/Lib/dbhash.py b/Lib/dbhash.py index ad94ed8efa1d..7aec772c879f 100644 --- a/Lib/dbhash.py +++ b/Lib/dbhash.py @@ -12,5 +12,5 @@ __all__ = ["error","open"] error = bsddb.error # Exported for anydbm -def open(file, flag, mode=0666): +def open(file, flag = 'r', mode=0666): return bsddb.hashopen(file, flag, mode)