File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ The contextlib module
431
431
The :mod: `contextlib ` module provides some functions and a decorator that
432
432
are useful when writing objects for use with the ':keyword: `with `' statement.
433
433
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
435
435
generator function instead of defining a new class. The generator should yield
436
436
exactly one value. The code up to the :keyword: `yield ` will be executed as the
437
437
: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::
469
469
with nested (db_transaction(db), lock) as (cursor, locked):
470
470
...
471
471
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
473
473
bound to a variable, and calls the argument's ``.close() `` method at the end
474
474
of the block. ::
475
475
You can’t perform that action at this time.
0 commit comments