Lines Matching refs:managers
16 :ref:`context-managers`.
24 function for :keyword:`with` statement context managers, without needing to
69 Combine multiple context managers into a single nested context manager.
76 used with a variable number of context managers as follows::
80 with nested(*managers):
83 Note that if the :meth:`__exit__` method of one of the nested context managers
85 passed to any remaining outer context managers. Similarly, if the
86 :meth:`__exit__` method of one of the nested managers raises an exception, any
88 :meth:`__exit__` methods of any remaining outer context managers. In general,
93 as the context managers are all constructed before the function is invoked, the
94 :meth:`__new__` and :meth:`__init__` methods of the inner context managers are
95 not actually covered by the scope of the outer context managers. That means, for
100 Secondly, if the :meth:`__enter__` method of one of the inner context managers
102 of one of the outer context managers, this construct will raise
106 Developers that need to support nesting of a variable number of context managers