Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Doc/library/shelve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Shelf objects support most of methods and operations supported by dictionaries
(except copying, constructors and operators ``|`` and ``|=``). This eases the
transition from dictionary based scripts to those requiring persistent storage.

Two additional methods are supported:
The following additional methods are supported:

.. method:: Shelf.sync()

Expand All @@ -98,6 +98,12 @@ Two additional methods are supported:
dictionary on disk, if feasible. This is called automatically when
:meth:`reorganize` is called or the shelf is closed with :meth:`close`.

.. warning::

When calling :meth:`sync`, the *writeback* attribute is temporarily set
to :const:`False` and other threads will stop updating the cache. Thus,
this method, and any method calling it, is **not** thread-safe.

.. method:: Shelf.reorganize()

Calls :meth:`sync` and attempts to shrink space used on disk by removing empty
Expand Down
Loading