Base di conoscenzaCentro esami
ITItaliano
Scegli la lingua13

CKTIS / Python

Base di conoscenza — Python

Sintassi, operatori e concetti di programmazione. Trova una spiegazione, consulta un esempio e torna a imparare.

Voci: 583

Python

collections.OrderedDict

Conserva l’ordine delle chiavi e consente di spostare voci esistenti.

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

contextlib.AbstractContextManager

La classe base per with sincrono fornisce `__enter__` che restituisce il gestore.

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

contextlib.aclosing

Racchiude un oggetto dotato di aclose() in un ambito async with.

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

contextlib.asynccontextmanager

Trasforma una funzione generatrice asincrona in una fabbrica per async with.

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

contextlib.AsyncExitStack

Accumula pulizie sincrone e asincrone in una pila LIFO.

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

contextlib.closing

Permette with per una risorsa dotata di close() sincrono.

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

contextlib.ContextDecorator

Permette di usare come decoratore un gestore con `__enter__` e `__exit__`.

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

contextlib.contextmanager

Decora una funzione generatrice con un solo yield come fabbrica di gestori with monouso.

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

contextlib.ExitStack

Gestisce un numero variabile di risorse scelte in esecuzione.

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

contextlib.nullcontext

Sostituisce un gestore facoltativo e all’ingresso restituisce enter_result, di norma None.

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

contextlib.redirect_stderr

Collega temporaneamente sys.stderr a un flusso scrivibile e lo fornisce con as.

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

contextlib.redirect_stdout

Cattura l’uscita di print sostituendo temporaneamente sys.stdout.

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

contextlib.suppress

Sopprime le eccezioni delle classi e sottoclassi indicate e riprende dopo il blocco.

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

cProfile.Profile

Un oggetto Profile raccoglie statistiche sulle chiamate e runcall restituisce il normale risultato della funzione.

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

cProfile.run

run profila istruzioni nello spazio dei nomi del modulo principale.

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

cProfile.runctx

runctx profila istruzioni con il dizionario globale e la mappa dei nomi locali forniti.

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

csv.Dialect

Raggruppa le opzioni CSV in un dialetto riutilizzabile in lettura e scrittura.

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

csv.DictReader

Legge i record come dizionari nell’ordine delle colonne.

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

csv.DictWriter

Scrive dizionari in un flusso di testo nell’ordine dei fieldnames obbligatori.

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

csv.reader

Legge un iterabile di righe di testo e produce liste di campi.

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

csv.Sniffer

Deduce il dialetto da un campione rappresentativo di testo.

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

csv.writer

Scrive righe di campi in un flusso di testo dotato di write().

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

dataclasses.asdict

Converte un’istanza di classe di dati in un dizionario di nomi e valori tramite dict_factory.

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