Base di conoscenzaCentro esami
ITItaliano
Scegli la lingua13

CKTIS / Base di conoscenza

Base di conoscenza

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

Voci: 5788

Python

property()

La lettura di box.area chiama il getter con l’istanza self e dà 3 · 4 = 12.

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

repr()

Restituisce un testo di ispezione tramite `__repr__`.

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

reversed()

Crea un iteratore inverso tramite `__reversed__` o lunghezza e indici della sequenza.

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

round()

Arrotonda un numero alla posizione decimale scelta.

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

set()

Crea un insieme modificabile di elementi che ammettono hash.

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

setattr()

Assegna l’attributo indicato dalla stringa e restituisce None.

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

slice()

Memorizza inizio, fine esclusa e passo per un taglio successivo.

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

sorted()

Restituisce una nuova lista ordinata tramite il confronto «minore di».

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

staticmethod()

Espone una funzione nello spazio dei nomi della classe senza aggiungere automaticamente self o cls.

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

sum()

Somma gli elementi con start come addendo iniziale.

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

super()

Crea un proxy che cerca dopo la classe corrente nell’ordine di risoluzione dei metodi del ricevente.

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

tuple()

Costruisce una tupla immutabile e ordinata da un iterabile.

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

type()

Con un argomento restituisce il tipo effettivo dell’oggetto.

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

vars()

Con un argomento recupera il `__dict__` dell’oggetto.

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

zip()

Raggruppa gli elementi corrispondenti in tuple durante l’iterazione.

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

Parola chiave as

Lega un nome secondo l’istruzione.

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

Parola chiave assert

Verifica un invariante diagnostico quando `__debug__` è vero.

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

Parola chiave async

Una definizione async def senza yield crea una funzione coroutine la cui chiamata restituisce una coroutine senza eseguire il corpo.

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

Parola chiave await

In una coroutine o in un generatore asincrono riceve il risultato o l’eccezione di un oggetto awaitable.

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

Parola chiave break

Esce dal ciclo più interno e ne salta il blocco else.

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

Parola chiave case

Seleziona un ramo di match provando il modello e poi la guardia opzionale.

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

Parola chiave class

Il corpo della classe si esegue subito in uno spazio separato e il nome riceve il risultato dei decoratori, che possono sostituire la classe.

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