Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Module « typing » Python 3.13.2

Fonction Self - module typing

Signature de la fonction Self

def Self(*args, **kwds) 

Description

help(typing.Self)

Used to spell the type of "self" in classes.

Example::

    from typing import Self

    class Foo:
        def return_self(self) -> Self:
            ...
            return self

This is especially useful for:
    - classmethods that are used as alternative constructors
    - annotating an `__enter__` method which returns self


Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé