diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-02-11 03:06:51 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-02-11 03:06:51 (GMT) |
commit | 733ecdcc2f88a4231853c364aacb702b7a6949f9 (patch) | |
tree | 8e77de4b09605ee7aab038f1a4a08b4315c6fb90 /Doc | |
parent | 709b4c35cc6e6f5db58d9e440b5ca732b7fdb6a2 (diff) | |
download | cpython-733ecdcc2f88a4231853c364aacb702b7a6949f9.zip cpython-733ecdcc2f88a4231853c364aacb702b7a6949f9.tar.gz cpython-733ecdcc2f88a4231853c364aacb702b7a6949f9.tar.bz2 |
Merged revisions 78145 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r78145 | r.david.murray | 2010-02-10 21:42:19 -0500 (Wed, 10 Feb 2010) | 18 lines
Merged revisions 78141-78142 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78141 | r.david.murray | 2010-02-10 20:38:42 -0500 (Wed, 10 Feb 2010) | 6 lines
Issue 5754: tweak shelve doc wording to make it clearer that even when
writeback=True values are written to the backing store when assigned to
the shelf. Add test to confirm that this happens. Doc patch and added
test by Robert Lehmann. I also fixed the cross references to the sync
and close methods.
........
r78142 | r.david.murray | 2010-02-10 20:56:42 -0500 (Wed, 10 Feb 2010) | 3 lines
Improve issue 7835 fix per MAL to handle the case that the
module dictionary has also been cleared.
........
................
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/shelve.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index f7f7bf9..0650b41 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -27,14 +27,15 @@ lots of shared sub-objects. The keys are ordinary strings. Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are - written only when assigned to the shelf (see :ref:`shelve-example`). If the - optional *writeback* parameter is set to *True*, all entries accessed are - cached in memory, and written back on :meth:`sync` and :meth:`close`; this - can make it handier to mutate mutable entries in the persistent dictionary, - but, if many entries are accessed, it can consume vast amounts of memory for - the cache, and it can make the close operation very slow since all accessed - entries are written back (there is no way to determine which accessed entries - are mutable, nor which ones were actually mutated). + written *only* when assigned to the shelf (see :ref:`shelve-example`). If the + optional *writeback* parameter is set to *True*, all entries accessed are also + cached in memory, and written back on :meth:`~Shelf.sync` and + :meth:`~Shelf.close`; this can make it handier to mutate mutable entries in + the persistent dictionary, but, if many entries are accessed, it can consume + vast amounts of memory for the cache, and it can make the close operation + very slow since all accessed entries are written back (there is no way to + determine which accessed entries are mutable, nor which ones were actually + mutated). .. note:: |