Base de conhecimentoCentro de Exames
PT · PTPortuguês (Portugal)
Escolher idioma13

CKTIS / Python

Base de conhecimento — Python

Sintaxe, operadores e conceitos de programação. Encontra uma explicação, consulta um exemplo e continua a aprender.

Entradas: 583

Python

collections.OrderedDict

Conserva a ordem das chaves e permite deslocar entradas existentes.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.AbstractContextManager

A classe base para with síncrono fornece `__enter__` que devolve o gestor.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.aclosing

Envolve um objeto com aclose() num âmbito async with.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.asynccontextmanager

Transforma uma função geradora assíncrona numa fábrica para async with.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.AsyncExitStack

Empilha limpezas síncronas e assíncronas em ordem LIFO.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.closing

Permite usar with com um recurso que fornece close() síncrono.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.ContextDecorator

Permite usar como decorador um gestor com `__enter__` e `__exit__`.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.contextmanager

Decora uma função geradora com um único yield como fábrica de gestores with de utilização única.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.ExitStack

Gere um número variável de recursos escolhidos na execução.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.nullcontext

Substitui um gestor opcional e à entrada devolve enter_result, por predefinição None.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.redirect_stderr

Associa temporariamente sys.stderr a um destino de escrita e fornece-o por as.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.redirect_stdout

Captura a saída de print substituindo temporariamente sys.stdout.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

contextlib.suppress

Suprime exceções das classes e subclasses indicadas e retoma após o bloco.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

cProfile.Profile

Um objeto Profile recolhe estatísticas das chamadas e runcall devolve o resultado normal da função.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

cProfile.run

run traça o perfil das instruções no espaço de nomes do módulo principal.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

cProfile.runctx

runctx traça o perfil das instruções com o dicionário global e o mapeamento de nomes locais indicados.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.Dialect

Agrupa opções CSV num dialeto reutilizável na leitura e escrita.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.DictReader

Lê registos como dicionários pela ordem das colunas.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.DictWriter

Escreve dicionários num fluxo de texto pela ordem dos fieldnames obrigatórios.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.reader

Lê um iterável de linhas de texto e produz listas de campos.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.Sniffer

Deduz o dialeto a partir de uma amostra de texto representativa.

Intermédio · Python 3.14; repository image, production runtime not attested
Python

csv.writer

Escreve linhas de campos num fluxo de texto com write().

Intermédio · Python 3.14; repository image, production runtime not attested
Python

dataclasses.asdict

Converte uma instância de classe de dados num dicionário de nomes e valores através de dict_factory.

Intermédio · Python 3.14; repository image, production runtime not attested