Added a couple of cross-refs between the context manager/with statement sections.

This commit is contained in:
mark.summerfield
2007-08-14 10:51:02 +00:00
parent 41a246c0f0
commit cd6d0f9e74
2 changed files with 4 additions and 2 deletions

View File

@@ -9,7 +9,8 @@
.. versionadded:: 2.5
This module provides utilities for common tasks involving the :keyword:`with`
statement.
statement. For more information see also :ref:`typecontextmanager` and
:ref:`context-managers`.
Functions provided:

View File

@@ -2160,7 +2160,8 @@ to be provided for a context manager object to define a runtime context:
Python defines several context managers to support easy thread synchronisation,
prompt closure of files or other objects, and simpler manipulation of the active
decimal arithmetic context. The specific types are not treated specially beyond
their implementation of the context management protocol.
their implementation of the context management protocol. See the
:mod:`contextlib` module for some examples.
Python's generators and the ``contextlib.contextfactory`` decorator provide a
convenient way to implement these protocols. If a generator function is