Protocol - The Keystone of Type Hints
Offered By: PyCon US via YouTube
Course Description
Overview
Explore the importance of PEP 544 and Protocols in Python's static type system in this 28-minute PyCon US talk by Luciano Ramalho. Dive into the concept of structural subtyping and static duck typing, understanding how typing.Protocol enhances the expressiveness of type hints. Learn how this feature enables correct annotation of Pythonic APIs and standard library functions. Examine real-world examples from the typeshed project, progressing from basic concepts to more complex applications. Gain insights into static vs. dynamic typing, annotations, numeric unions, restricted type variables, and syntax. Discover how Protocols serve as the keystone for Python type hints, improving code verification by static type checkers and IDEs.
Syllabus
Introduction
Static vs Dynamic typing
The problem
Annotations
Number ABC
Numeric Union
Restricted Type var
Syntax
Solution
Taught by
PyCon US
Related Courses
Artificial Intelligence for RoboticsStanford 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