EAFP - Function Annotations

Function Annotations

Function annotations are defined in PEP 3107. They allow attaching data to the arguments and return of a function. The behaviour of annotations is not defined by the language - and left to third party frameworks. For example, a library could be written to handle static typing:

def haul(item: Haulable, *vargs: PackAnimal) -> Distance

Read more about this topic:  EAFP

Famous quotes containing the word function:

    The art of living is to function in society without doing violence to one’s own needs or to the needs of others. The art of mothering is to teach the art of living to children.
    Elaine Heffner (20th century)