Planet Python
Follow
Mike Driscoll: New Book Release: Python Typing
My new book, Python Typing, is officially released and accessible across multiple platforms. You can purchase it on Gumroad, Leanpub, or Amazon. Python has offered type hinting capabilities since version 3.5, a feature that has evolved significantly over time. This book comprehensively covers how to effectively incorporate type hints into your Python projects. It will guide you through understanding Python's annotation system in detail. You will explore essential concepts such as variable and function annotations, type aliases, new types, and generics. The book also delves into hinting callables, TypedDict, decorators, and generators. Beyond just annotations, it provides practical knowledge on using and configuring Python type checkers like Mypy and ty. Furthermore, you will learn to integrate these tools into your development workflow using pre-commit hooks or GitHub Actions. This integration empowers automatic code checking before code merges, aiming to prevent defects from entering production.