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
2aefe8d7
Commit
2aefe8d7
authored
Apr 28, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document changed semantics -- open() now guesses the db type and error
is now a tuple of various and sundry exceptions.
parent
fc1f64d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
Doc/lib/libanydbm.tex
Doc/lib/libanydbm.tex
+10
-2
Doc/libanydbm.tex
Doc/libanydbm.tex
+10
-2
No files found.
Doc/lib/libanydbm.tex
View file @
2aefe8d7
...
...
@@ -11,6 +11,12 @@ be used.
\begin{funcdesc}
{
open
}{
filename
\optional
{
, flag
\optional
{
, mode
}}}
Open the database file
\var
{
filename
}
and return a corresponding object.
If the database file already exists, the
\module
{
whichdb
}
module is
used to determine its type and the appropriate module is used; if it
doesn't exist, the first module listed above that can be imported is
used.
The optional
\var
{
flag
}
argument can be
\code
{
'r'
}
to open an existing database for reading only,
\code
{
'w'
}
to open an existing database for reading and writing,
...
...
@@ -24,8 +30,10 @@ only when the database has to be created. It defaults to octal
\end{funcdesc}
\begin{excdesc}
{
error
}
An alternate name for the
\exception
{
error
}
exception defined by the
underlying database implementation.
A tuple containing the exceptions that can be raised by each of the
supported modules, with a unique exception
\exception
{
anydbm.error
}
as
the first item --- the latter is used when
\exception
{
anydbm.error
}
is
raised.
\end{excdesc}
The object returned by
\function
{
open()
}
supports most of the same
...
...
Doc/libanydbm.tex
View file @
2aefe8d7
...
...
@@ -11,6 +11,12 @@ be used.
\begin{funcdesc}
{
open
}{
filename
\optional
{
, flag
\optional
{
, mode
}}}
Open the database file
\var
{
filename
}
and return a corresponding object.
If the database file already exists, the
\module
{
whichdb
}
module is
used to determine its type and the appropriate module is used; if it
doesn't exist, the first module listed above that can be imported is
used.
The optional
\var
{
flag
}
argument can be
\code
{
'r'
}
to open an existing database for reading only,
\code
{
'w'
}
to open an existing database for reading and writing,
...
...
@@ -24,8 +30,10 @@ only when the database has to be created. It defaults to octal
\end{funcdesc}
\begin{excdesc}
{
error
}
An alternate name for the
\exception
{
error
}
exception defined by the
underlying database implementation.
A tuple containing the exceptions that can be raised by each of the
supported modules, with a unique exception
\exception
{
anydbm.error
}
as
the first item --- the latter is used when
\exception
{
anydbm.error
}
is
raised.
\end{excdesc}
The object returned by
\function
{
open()
}
supports most of the same
...
...
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