Practical Uses for Function Annotations
Offered By: EuroPython Conference via YouTube
Course Description
Overview
Syllabus
Intro
What are Function Annotations? Syntactic sugar for adding metadata to function definitions
Annotations are just syntactic sugar
Adding Typing Information
Helping tools (IDE, Editor)
Wait a sec!
Libraries usually do this
Experiment: Runtime checking
Runtime checking: how it looks
But isinstance is killing duck typing!
Another example
Implementation of structural interfaces
Types + behaviour = predicates
More fun with predicates
The open function annotated again
Unions
Function overloading
More kinds of types typedefs
A different approach to type annotations: rightarrow
Using rightarrow
Combining different uses of annotations
Annotations for language bridges
Why annotations are not used? • Not a wide know feature
Questions?
Taught by
EuroPython Conference
Related Courses
A Brief History of Data StorageEuroPython Conference via YouTube Breaking the Stereotype - Evolution & Persistence of Gender Bias in Tech
EuroPython Conference via YouTube We Can Get More from Spatial, GIS, and Public Domain Datasets
EuroPython Conference via YouTube Using NLP to Detect Knots in Protein Structures
EuroPython Conference via YouTube The Challenges of Doing Infra-As-Code Without "The Cloud"
EuroPython Conference via YouTube