Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Python

Knowledge base — Python

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 583

Python

collections.OrderedDict

Maintains ordered key-value bindings and supports moving a key explicitly to either end.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.AbstractAsyncContextManager

Provides an asynchronous context-manager base with a default entry method returning the manager itself.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.AbstractContextManager

Supplies the context-manager entry protocol and returns the manager itself by default.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.aclosing

Ensures that asynchronous cleanup is awaited when a managed resource leaves its scope.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.asynccontextmanager

Converts an asynchronous generator function into a factory for asynchronous context managers.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.AsyncExitStack

Collects cleanup actions dynamically and unwinds them in reverse registration order on asynchronous scope exit.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.closing

Adapts an object with a close method into a context manager that always closes it.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.ContextDecorator

Allows a context manager to wrap the entire execution of a decorated function.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.contextmanager

Builds a context-manager factory from a generator that yields the managed value exactly once.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.ExitStack

Accumulates context managers and cleanup callbacks chosen at runtime and unwinds them on scope exit.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.nullcontext

Supplies a no-operation context manager that optionally returns a provided value.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.redirect_stderr

Temporarily routes writes to the Python standard error stream into a replacement stream.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.redirect_stdout

Temporarily replaces the Python standard output stream so printed text can be captured.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

contextlib.suppress

Continues after a managed block when one of the specified exception types is raised.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

cProfile.Profile

Profiles a callable while returning its ordinary result and retaining per-function statistics.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

cProfile.run

Profiles trusted statement text in the main module namespace and optionally writes the collected statistics to a file.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

cProfile.runctx

Profiles trusted statement text with explicit global and local namespaces.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.Dialect

Groups delimiter, quoting and other CSV formatting parameters into a reusable dialect.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.DictReader

Reads rows into dictionaries using header fields as names by default.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.DictWriter

Writes mapping values in the explicit field order supplied to the writer.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.reader

Parses delimited rows while honoring quoted fields and escaped quotes.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.Sniffer

Infers likely CSV formatting from sample text and returns a dialect.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

csv.writer

Serializes field sequences into delimited rows and quotes fields as needed.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.asdict

Recursively converts a data-class instance into a dictionary of field names and values.

Intermediate · Python 3.14; repository image, production runtime not attested