Skip to content

_Framework.InputControlElement.contextlib (runtime)

Live 12 — Live Object Model & framework reference (descriptions and signatures).

Functions

asynccontextmanager(func)

contextmanager(func)

wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))

Classes

class AbstractAsyncContextManager(ABC)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab5fec0> - Internal state held by ABC machinery.

class AbstractContextManager(ABC)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab5e1c0> - Internal state held by ABC machinery.

class AsyncContextDecorator

Methods

__call__(self, func)

Call self as a function.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

_recreate_cm(self)

class AsyncExitStack(_BaseExitStack, AbstractAsyncContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self)

Initialize self. See help(type(self)) for accurate signature.

_create_async_cb_wrapper(callback, /, *args, **kwds)
_create_async_exit_wrapper(cm, cm_exit)
_create_cb_wrapper(callback, /, *args, **kwds)
_create_exit_wrapper(cm, cm_exit)
_push_async_cm_exit(self, cm, cm_exit)
_push_cm_exit(self, cm, cm_exit)
_push_exit_callback(self, callback, is_sync=True)
aclose(self)
callback(self, callback, /, *args, **kwds)
enter_async_context(self, cm)
enter_context(self, cm)
pop_all(self)
push(self, exit)
push_async_callback(self, callback, /, *args, **kwds)
push_async_exit(self, exit)

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75480> - Internal state held by ABC machinery.

class ContextDecorator

Methods

__call__(self, func)

Call self as a function.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

_recreate_cm(self)

class ExitStack(_BaseExitStack, AbstractContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self)

Initialize self. See help(type(self)) for accurate signature.

_create_cb_wrapper(callback, /, *args, **kwds)
_create_exit_wrapper(cm, cm_exit)
_push_cm_exit(self, cm, cm_exit)
_push_exit_callback(self, callback, is_sync=True)
callback(self, callback, /, *args, **kwds)
close(self)
enter_context(self, cm)
pop_all(self)
push(self, exit)

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75300> - Internal state held by ABC machinery.

class GenericAlias

Represent a PEP 585 generic type

E.g. for t = list[int], t.origin is list and t.args is (int,).

Methods

__call__(self, /, *args, **kwargs)

Call self as a function.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

class MethodType

Create a bound instance method object.

Methods

__call__(self, /, *args, **kwargs)

Call self as a function.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

class aclosing(AbstractAsyncContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, thing)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab74e40> - Internal state held by ABC machinery.

class chdir(AbstractContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, path)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75580> - Internal state held by ABC machinery.

class closing(AbstractContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, thing)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab74dc0> - Internal state held by ABC machinery.

class deque

deque([iterable[, maxlen]]) --> deque object

A list-like sequence optimized for data accesses near its endpoints.

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

append(...)

Add an element to the right side of the deque.

appendleft(...)

Add an element to the left side of the deque.

clear(...)

Remove all elements from the deque.

copy(...)

Return a shallow copy of a deque.

count(...)

D.count(value) -- return number of occurrences of value

extend(...)

Extend the right side of the deque with elements from the iterable

extendleft(...)

Extend the left side of the deque with elements from the iterable

index(...)

D.index(value, [start, [stop]]) -- return first index of value. Raises ValueError if the value is not present.

insert(...)

D.insert(index, object) -- insert object before index

pop(...)

Remove and return the rightmost element.

popleft(...)

Remove and return the leftmost element.

remove(...)

D.remove(value) -- remove first occurrence of value.

reverse(...)

D.reverse() -- reverse IN PLACE

rotate(...)

Rotate the deque n steps to the right (default n=1). If n is negative, rotates left.

Attributes

  • maxlen = <attribute 'maxlen' of 'collections.deque' objects> - maximum size of a deque or None if unbounded

class nullcontext(AbstractContextManager, AbstractAsyncContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, enter_result=None)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75500> - Internal state held by ABC machinery.

class redirect_stderr(_RedirectStream)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, new_target)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75000> - Internal state held by ABC machinery.
  • _stream = 'stderr' - str(object='') -> str

class redirect_stdout(_RedirectStream)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, new_target)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab74f80> - Internal state held by ABC machinery.
  • _stream = 'stdout' - str(object='') -> str

class suppress(AbstractContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, *exceptions)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75080> - Internal state held by ABC machinery.