YoVDO

Practical Uses for Function Annotations

Offered By: EuroPython Conference via YouTube

Tags

EuroPython Courses Python Courses Metadata Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore practical applications of function annotations in Python during this 57-minute EuroPython 2013 conference talk. Delve into the concept of function annotations as syntactic sugar for adding metadata to function definitions. Learn how to leverage annotations for adding typing information, enhancing IDE and editor support, and implementing runtime checking. Discover the potential of structural interfaces, predicates, and function overloading using annotations. Examine different approaches to type annotations, including the 'rightarrow' library. Investigate how annotations can be utilized for language bridges and discuss reasons for their limited adoption in the Python community. Gain insights into advanced Python features and techniques to improve code quality and maintainability.

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

Artificial Intelligence for Robotics
Stanford University via Udacity
Intro to Computer Science
University of Virginia via Udacity
Design of Computer Programs
Stanford University via Udacity
Web Development
Udacity
Programming Languages
University of Virginia via Udacity