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
431431The :mod: `contextlib ` module provides some functions and a decorator that
432432are 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
435435generator function instead of defining a new class. The generator should yield
436436exactly 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
473473bound to a variable, and calls the argument's ``.close() `` method at the end
474474of the block. ::
475475
You can’t perform that action at this time.
0 commit comments