Commit 6f8b99e8 authored by Georg Brandl's avatar Georg Brandl

#6803: fix old name.

parent fff896b3
...@@ -2549,9 +2549,9 @@ decimal arithmetic context. The specific types are not treated specially beyond ...@@ -2549,9 +2549,9 @@ decimal arithmetic context. The specific types are not treated specially beyond
their implementation of the context management protocol. See the their implementation of the context management protocol. See the
:mod:`contextlib` module for some examples. :mod:`contextlib` module for some examples.
Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator` Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator`
provide a convenient way to implement these protocols. If a generator function is provide a convenient way to implement these protocols. If a generator function is
decorated with the ``contextlib.contextfactory`` decorator, it will return a decorated with the ``contextlib.contextmanager`` decorator, it will return a
context manager implementing the necessary :meth:`__enter__` and context manager implementing the necessary :meth:`__enter__` and
:meth:`__exit__` methods, rather than the iterator produced by an undecorated :meth:`__exit__` methods, rather than the iterator produced by an undecorated
generator function. generator function.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment