Home
last modified time | relevance | path

Searched refs:ContextDecorator (Results 1 – 5 of 5) sorted by relevance

/external/python/cpython3/Doc/library/
Dcontextlib.rst89 :func:`contextmanager` uses :class:`ContextDecorator` so the context managers
97 Use of :class:`ContextDecorator`.
278 .. class:: ContextDecorator()
282 Context managers inheriting from ``ContextDecorator`` have to implement
286 ``ContextDecorator`` is used by :func:`contextmanager`, so you get this
289 Example of ``ContextDecorator``::
291 from contextlib import ContextDecorator
293 class mycontext(ContextDecorator):
324 ``ContextDecorator`` lets you instead write::
334 using ``ContextDecorator`` as a mixin class::
[all …]
/external/python/cpython3/Lib/
Dcontextlib.py55 class ContextDecorator(object): class
98 ContextDecorator):
/external/python/cpython3/Lib/test/
Dtest_contextlib.py381 class mycontext(ContextDecorator):
488 class mycontext(ContextDecorator):
500 class mycontext(ContextDecorator):
523 class mycontext(somecontext, ContextDecorator):
/external/python/cpython3/Doc/whatsnew/
D3.2.rst1233 :class:`~contextlib.ContextDecorator` that is helpful for creating a
/external/python/cpython3/Misc/
DHISTORY13282 - Issue #9110: Addition of ContextDecorator to contextlib, for creating APIs
13284 use ContextDecorator.