]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport bug [ 1248199 ] shelve .sync operation not documented
authorGeorg Brandl <georg@python.org>
Thu, 25 Aug 2005 22:40:21 +0000 (22:40 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 25 Aug 2005 22:40:21 +0000 (22:40 +0000)
Doc/lib/libshelve.tex

index e369c2a9707860c2586a12f473921aee930ac157..f17b82c2519fd922adb53737c686eec0647cd429 100644 (file)
@@ -43,6 +43,14 @@ Shelve objects support all methods supported by dictionaries.  This eases
 the transition from dictionary based scripts to those requiring persistent
 storage.
 
+One additional method is supported:
+\begin{methoddesc}[Shelf]{sync}{}
+Write back all entries in the cache if the shelf was opened with
+\var{writeback} set to \var{True}. Also empty the cache and synchronize
+the persistent dictionary on disk, if feasible.  This is called automatically
+when the shelf is closed with \method{close()}.
+\end{methoddesc}
+
 \subsection{Restrictions}
 
 \begin{itemize}