YoVDO

Protocol - The Keystone of Type Hints

Offered By: PyCon US via YouTube

Tags

PyCon US Courses Python Courses Type Annotations Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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

Learn TypeScript: Complex Types
Codecademy
Learn TypeScript: Functions
Codecademy
TypeScript Interactive Handbook
Independent
Practical TypeScript - Course for Beginners
freeCodeCamp
Introduction to Elm, v2
Frontend Masters