Type Hints for Python 3.5
summary
PEP 484 defines optional type hints and is accepted into Python 3.5 beta 1; a pure-Python typing module implements names like Any, Union and Optional and is marked provisional. Type checking runs separately from the interpreter so execution cost is unchanged. Stubs (.pyi) let C extensions and third-party packages supply annotations without changing source. The design supports gradual typing, generic types, forward references and will work with external type checkers.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:09Type Hints
- 1:58Function Annotation Syntax
- 5:07Static Type Checking Is Not a Function of the Python Interpreter
- 6:28Function Annotations
- 11:33Additional Documentation
- 12:13C Extensions
- 13:54Stub Files
- 28:13What Is Gradual Typing
- 34:10Generic Types
- 34:31Union Type
- 35:08Tuple
- 36:42Generic Functions
- 37:07Type Variable
related talks
32mPython's New Type Hints in Action… In JavaScript
33mType Hints
29mPython Type hints and how they can supercharge CS education.
28mGradual Typing in Python
32mStatic Typing in Python
31mTaming the Duck with Type Hints
27m"How to Use Static Typing in Python with Type Hints, MyPy and Pydantic"
23mGradual Typing in Python
