]> granicus.if.org Git - python/commitdiff
bug [ 1248199 ] shelve .sync operation not documented
authorGeorg Brandl <georg@python.org>
Thu, 25 Aug 2005 22:40:16 +0000 (22:40 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 25 Aug 2005 22:40:16 +0000 (22:40 +0000)
Doc/lib/libshelve.tex

index 9e9f7fe6c45b72574e9b56d1d1030a3f52ae3cdc..8bd204e331ee3b3d3dcf5d57d2bdd22ed2498a42 100644 (file)
@@ -42,6 +42,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}