mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Added a couple of cross-refs between the context manager/with statement sections.
This commit is contained in:
@@ -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:
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user