⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module-dumbdbm.html

📁 一本很好的python的说明书,适合对python感兴趣的人
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>7.10 dumbdbm -- Portable DBM implementation</title>
<META NAME="description" CONTENT="7.10 dumbdbm -- Portable DBM implementation">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" href="lib.css" tppabs="http://www.python.org/doc/current/lib/lib.css">
<LINK REL="next" href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html">
<LINK REL="previous" href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html">
<LINK REL="up" href="someos.html" tppabs="http://www.python.org/doc/current/lib/someos.html">
<LINK REL="next" href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html">
</head>
<body>
<DIV CLASS="navigation"><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="someos.html" tppabs="http://www.python.org/doc/current/lib/someos.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
  alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html">7.9 anydbm  </A>
<b class="navlabel">Up:</b> <a class="sectref" href="someos.html" tppabs="http://www.python.org/doc/current/lib/someos.html">7. Optional Operating System</A>
<b class="navlabel">Next:</b> <a class="sectref" href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html">7.11 dbhash  </A>
<br><hr></DIV>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0091000000000000000000">
7.10 <tt class="module">dumbdbm</tt> --
         Portable DBM implementation</A>
</H1>

<P>


<P>
A simple and slow database implemented entirely in Python.  This
should only be used when no other DBM-style database is available.

<P>
<dl><dt><b><a name='l2h-1712'><tt class='function'>open</tt></a></b> (<var>filename</var><big>[</big><var>, flag</var><big>[</big><var>, mode</var><big>]</big><big>]</big>)
<dd>
Open the database file <var>filename</var> and return a corresponding object.
The optional <var>flag</var> argument can be
<code>'r'</code> to open an existing database for reading only,
<code>'w'</code> to open an existing database for reading and writing,
<code>'c'</code> to create the database if it doesn't exist, or
<code>'n'</code>, which will always create a new empty database.  If not
specified, the default value is <code>'r'</code>.

<P>
The optional <var>mode</var> argument is the Unix mode of the file, used
only when the database has to be created.  It defaults to octal
<code>0666</code> (and will be modified by the prevailing umask).
</dl>

<P>
<dl><dt><b><a name='l2h-1713'><tt class='exception'>error</tt></a></b>
<dd>
Raised for errors not reported as <tt class="exception">KeyError</tt> errors.
</dl>

<P>
<div class='seealso'>
  <p class='heading'><b>See Also:</b></p>

  <dl compact class="seemodule">
    <dt>Module <b><tt class='module'><a href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html">anydbm</a></tt>:</b>
    <dd>Generic interface to <code>dbm</code>-style databases.
  </dl>
  <dl compact class="seemodule">
    <dt>Module <b><tt class='module'><a href="module-whichdb.html" tppabs="http://www.python.org/doc/current/lib/module-whichdb.html">whichdb</a></tt>:</b>
    <dd>Utility module used to determine the type of an
                      existing database.
  </dl>
</div>

<DIV CLASS="navigation"><p><hr><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="someos.html" tppabs="http://www.python.org/doc/current/lib/someos.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
  alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="module-anydbm.html" tppabs="http://www.python.org/doc/current/lib/module-anydbm.html">7.9 anydbm  </A>
<b class="navlabel">Up:</b> <a class="sectref" href="someos.html" tppabs="http://www.python.org/doc/current/lib/someos.html">7. Optional Operating System</A>
<b class="navlabel">Next:</b> <a class="sectref" href="module-dbhash.html" tppabs="http://www.python.org/doc/current/lib/module-dbhash.html">7.11 dbhash  </A>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>See <i><a href="about.html" tppabs="http://www.python.org/doc/current/lib/about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -