# [Python-checkins] r53546 - python/branches/release25-maint/Doc/lib/libmailbox.tex

andrew.kuchling python-checkins at python.org
Wed Jan 24 21:08:13 CET 2007

Author: andrew.kuchling
Date: Wed Jan 24 21:08:13 2007
New Revision: 53546

Modified:
python/branches/release25-maint/Doc/lib/libmailbox.tex
Log:

Modified: python/branches/release25-maint/Doc/lib/libmailbox.tex
==============================================================================
--- python/branches/release25-maint/Doc/lib/libmailbox.tex	(original)
+++ python/branches/release25-maint/Doc/lib/libmailbox.tex	Wed Jan 24 21:08:13 2007
@@ -58,14 +58,18 @@
\exception{KeyError} exception if the corresponding message is subsequently
removed.

-Be very cautious when modifying mailboxes that might also be changed
-by some other process.  The safest mailbox format to use for such
-tasks is Maildir; try to avoid using single-file formats such as mbox
-for concurrent writing.  If you're modifying a mailbox, no matter what
-the format, you must lock it by calling the \method{lock()} and
-\method{unlock()} methods before making any changes.  Failing to lock
-the mailbox runs the risk of losing data if some other process makes
-changes to the mailbox while your Python code is running.
+\begin{notice}[warning]
+Be very cautious when modifying mailboxes that might be
+simultaneously changed by some other process.  The safest mailbox
+format to use for such tasks is Maildir; try to avoid using
+single-file formats such as mbox for concurrent writing.  If you're
+modifying a mailbox, you
+\emph{must} lock it by calling the \method{lock()} and
+\method{unlock()} methods \emph{before} reading any messages in the file
+or making any changes by adding or deleting a message.  Failing to
+lock the mailbox runs the risk of losing messages or corrupting the entire
+mailbox.
+\end{notice}

\class{Mailbox} instances have the following methods: