• Home
  • Raw
  • Download

Lines Matching refs:managers

13 :ref:`context-managers`.
39 :ref:`async-context-managers`.
47 function for :keyword:`with` statement context managers, without needing to
89 :func:`contextmanager` uses :class:`ContextDecorator` so the context managers
92 each function call (this allows the otherwise "one-shot" context managers
94 managers support multiple invocations in order to be used as decorators).
103 :ref:`asynchronous context manager <async-context-managers>`.
106 function for :keyword:`async with` statement asynchronous context managers,
157 .. _simplifying-support-for-single-optional-context-managers:
282 Context managers inheriting from ``ContextDecorator`` have to implement
333 Existing context managers that already have a base class can be extended by
357 combine other context managers and cleanup functions, especially those
374 This stack model is used so that context managers that acquire their
387 foundation for higher level context managers that manipulate the exit
398 These context managers may suppress exceptions just as they normally
452 reverse order of registration. For any context managers and exit
458 An :ref:`asynchronous context manager <async-context-managers>`, similar
460 asynchronous context managers, as well as having coroutines for
502 Supporting a variable number of context managers
506 documentation: supporting a variable number of context managers and other
508 may come from the number of context managers needed being driven by user
510 some of the context managers being optional::
712 Note that there is one additional limitation when using context managers
725 Single use, reusable and reentrant context managers
728 Most context managers are written in a way that means they can only be
730 context managers must be created afresh each time they're used -
735 context managers directly in the header of the :keyword:`with` statement
738 Files are an example of effectively single use context managers, since
742 Context managers created using :func:`contextmanager` are also single use
743 context managers, and will complain about the underlying generator failing
769 Reentrant context managers
772 More sophisticated context managers may be "reentrant". These context
773 managers can not only be used in multiple :keyword:`with` statements,
808 Reusable context managers
811 Distinct from both single use and reentrant context managers are "reusable"
812 context managers (or, to be completely explicit, "reusable, but not
813 reentrant" context managers, since reentrant context managers are also
814 reusable). These context managers support being used multiple times, but