diff options
author | Georg Brandl <georg@python.org> | 2008-05-26 10:29:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-26 10:29:35 (GMT) |
commit | 0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5 (patch) | |
tree | ec61fd6d53e6425b8639567860140c724ea7bc63 /Doc/library/shelve.rst | |
parent | e6f00637be87c8f5f0e50bf317d684ea421a6d19 (diff) | |
download | cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.zip cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.gz cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.bz2 |
Create the dbm package from PEP 3108. #2881.
Diffstat (limited to 'Doc/library/shelve.rst')
-rw-r--r-- | Doc/library/shelve.rst | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 262b4a4..ee839e8 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -21,7 +21,7 @@ lots of shared sub-objects. The keys are ordinary strings. the underlying database. As a side-effect, an extension may be added to the filename and more than one file may be created. By default, the underlying database file is opened for reading and writing. The optional *flag* parameter - has the same interpretation as the *flag* parameter of :func:`anydbm.open`. + has the same interpretation as the *flag* parameter of :func:`dbm.open`. By default, version 0 pickles are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. @@ -53,12 +53,12 @@ Restrictions ------------ .. index:: - module: dbm - module: gdbm + module: dbm.ndbm + module: dbm.gnu module: bsddb -* The choice of which database package will be used (such as :mod:`dbm`, - :mod:`gdbm` or :mod:`bsddb`) depends on which interface is available. Therefore +* The choice of which database package will be used (such as :mod:`dbm.ndbm`, + :mod:`dbm.gnu` or :mod:`bsddb`) depends on which interface is available. Therefore it is not safe to open the database directly using :mod:`dbm`. The database is also (unfortunately) subject to the limitations of :mod:`dbm`, if it is used --- this means that (the pickled representation of) the objects stored in the @@ -107,7 +107,7 @@ Restrictions .. class:: DbfilenameShelf(filename[, flag='c'[, protocol=None[, writeback=False]]]) A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like - object. The underlying file will be opened using :func:`anydbm.open`. By + object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened for both read and write. The optional *flag* parameter has the same interpretation as for the :func:`open` function. The optional *protocol* and *writeback* parameters have the same @@ -152,25 +152,12 @@ object):: .. seealso:: - Module :mod:`anydbm` - Generic interface to ``dbm``\ -style databases. + Module :mod:`dbm` + Generic interface to ``dbm``-style databases. Module :mod:`bsddb` BSD ``db`` database interface. - Module :mod:`dbhash` - Thin layer around the :mod:`bsddb` which provides an :func:`open` function like - the other database modules. - - Module :mod:`dbm` - Standard Unix database interface. - - Module :mod:`dumbdbm` - Portable implementation of the ``dbm`` interface. - - Module :mod:`gdbm` - GNU database interface, based on the ``dbm`` interface. - Module :mod:`pickle` Object serialization used by :mod:`shelve`. |