mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Fix bug #422702: Make flag argument to open optional, and document it that way.
This commit is contained in:
parent
2750bcc2d1
commit
e24fef0dd2
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user