mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Fix bug #422702: Make flag argument to open optional, and document it that way.
This commit is contained in:
parent
2750bcc2d1
commit
e24fef0dd2
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ This module provides an exception and a function:
|
||||||
\exception{KeyError}. It is a synonym for \exception{bsddb.error}.
|
\exception{KeyError}. It is a synonym for \exception{bsddb.error}.
|
||||||
\end{excdesc}
|
\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
|
Open a \code{db} database and return the database object. The
|
||||||
\var{path} argument is the name of the database file.
|
\var{path} argument is the name of the database file.
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,5 @@ __all__ = ["error","open"]
|
||||||
|
|
||||||
error = bsddb.error # Exported for anydbm
|
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)
|
return bsddb.hashopen(file, flag, mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue