Skip to content

Commit 49403ae

Browse files
encukoubitdancer
andauthored
Apply suggestions from code review
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
1 parent bef0829 commit 49403ae

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Doc/library/mailbox.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
7979
corrupting the entire mailbox.
8080

8181
The :class:`Mailbox` class supports the :keyword:`with` statement. When used
82-
like this, the Mailbox acquires a lock when the :keyword:`with` statement
83-
enters and releases it and :meth:`close` when the :keyword:`with` statement
84-
exits.
82+
as a context manager, :class:`!Mailbox` calls :meth:`lock` when the context is entered,
83+
returns the mailbox object as the context object, and at context end calls :meth:`close`,
84+
thereby releasing the lock.
8585

8686
.. versionchanged:: next
8787
Support for the :keyword:`with` statement was added.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Mailbox instances can be used as a context manager. The Mailbox is locked
2-
at enter and unlocked and closed at exit.
1+
:mod:`Mailbox` instances can now be used as a context manager. The Mailbox is locked on context entry and unlocked and closed at context exit.

0 commit comments

Comments
 (0)