Skip to content

Commit dd87800

Browse files
committed
fix contextlib references
1 parent 03605c4 commit dd87800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/whatsnew/2.6.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ The contextlib module
431431
The :mod:`contextlib` module provides some functions and a decorator that
432432
are useful when writing objects for use with the ':keyword:`with`' statement.
433433

434-
The decorator is called :func:`contextmanager`, and lets you write a single
434+
The decorator is called :func:`~contextlib.contextmanager`, and lets you write a single
435435
generator function instead of defining a new class. The generator should yield
436436
exactly one value. The code up to the :keyword:`yield` will be executed as the
437437
:meth:`~object.__enter__` method, and the value yielded will be the method's return
@@ -469,7 +469,7 @@ statement both starts a database transaction and acquires a thread lock::
469469
with nested (db_transaction(db), lock) as (cursor, locked):
470470
...
471471

472-
Finally, the :func:`closing` function returns its argument so that it can be
472+
Finally, the :func:`~contextlib.closing` function returns its argument so that it can be
473473
bound to a variable, and calls the argument's ``.close()`` method at the end
474474
of the block. ::
475475

0 commit comments

Comments
 (0)