Lines Matching full:shelf
13 A "shelf" is a persistent, dictionary-like object. The difference with "dbm"
14 databases is that the values (not the keys!) in a shelf can be essentially
32 Because of Python semantics, a shelf cannot know when a mutable
34 written *only* when assigned to the shelf (see :ref:`shelve-example`). If the
36 cached in memory, and written back on :meth:`~Shelf.sync` and
37 :meth:`~Shelf.close`; this can make it handier to mutate mutable entries in
53 Do not rely on the shelf being closed automatically; always call
54 :meth:`~Shelf.close` explicitly when you don't need it any more, or
65 to load a shelf from an untrusted source. Like with pickle, loading a shelf
68 Shelf objects support most of methods and operations supported by dictionaries
74 .. method:: Shelf.sync()
76 Write back all entries in the cache if the shelf was opened with *writeback*
78 dictionary on disk, if feasible. This is called automatically when the shelf
81 .. method:: Shelf.close()
84 shelf will fail with a :exc:`ValueError`.
111 program has a shelf open for writing, no other program should have it open for
120 .. class:: Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8')
138 A :class:`Shelf` object can also be used as a context manager, in which
155 A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`,
164 interpretation as for the :class:`Shelf` class.
169 A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like
174 interpretation as for the :class:`Shelf` class.