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

math.pi

Fornisce come float un’approssimazione del rapporto fra circonferenza e diametro.

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

math.prod

Moltiplica i valori numerici a partire dal fattore start, passato solo per nome.

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

math.sin

Calcola il seno di un angolo in radianti, la coordinata verticale sulla circonferenza unitaria.

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

math.sqrt

Calcola la radice quadrata reale non negativa come float.

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

math.tan

Calcola la tangente di un angolo in radianti dividendo il seno per il coseno.

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

math.trunc

Elimina la parte frazionaria e restituisce un int per un float.

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

object.__class__

In un’istanza ordinaria l’attributo fa riferimento al suo oggetto classe.

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

object.__enter__

Il metodo d’ingresso viene eseguito prima del corpo di with e il risultato è legato al bersaglio as.

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

object.__eq__

Un metodo di uguaglianza può confrontare i dati o restituire NotImplemented per un tipo non supportato.

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

object.__exit__

Dopo un ingresso riuscito il metodo di uscita chiude il contesto e può decidere se l’eccezione si propaga.

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

object.__gt__

Il metodo implementa il confronto strettamente maggiore e può rifiutare con NotImplemented.

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

object.__init__

L’inizializzatore imposta lo stato di un’istanza già creata e deve restituire None.

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

object.__iter__

Il metodo di iterazione restituisce un iteratore sugli elementi dell’oggetto.

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

object.__le__

Il metodo definisce minore o uguale e può esprimere un ordine parziale.

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

object.__lt__

Il metodo strettamente minore fornisce il confronto utilizzato per ordinare.

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

object.__repr__

Il metodo di rappresentazione restituisce una stringa per identificare chiaramente un oggetto durante il debug.

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

object.__str__

La conversione in stringa fornisce una forma leggibile dell’oggetto.

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

operator.itemgetter

Crea un oggetto invocabile che in seguito legge elementi dal suo operando.

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

pstats.Stats — analizzare i risultati della profilazione

pstats.Stats analizza i dati del profiler ordinando le statistiche delle funzioni e generando report. Non misura direttamente l’esecuzione: accetta un profilo salvato oppure un oggetto profiler.

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

pstats.Stats.stats — statistiche grezze di profilazione

pstats.Stats.stats è un dizionario di dati di profilazione le cui chiavi combinano il nome del file, il numero di riga e il nome della funzione. Consente di leggere direttamente i conteggi delle chiamate, il tempo interno, il tempo cumulativo e le informazioni sulle funzioni chiamanti, senza analizzare un rapporto testuale.

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

re.compile

Compila un’espressione in un Pattern riutilizzabile che conserva il modello e le opzioni.

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

re.escape

Protegge i metacaratteri di un frammento da cercare letteralmente in un modello.

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

re.findall

Raccoglie da sinistra a destra le corrispondenze non sovrapposte, anche vuote, in una lista.

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

re.finditer

Fornisce oggetti Match successivi in un iteratore per accedere a posizioni e gruppi senza costruire una lista.

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