Type Hints - Putting More Buzz in Your Fizz
Explore type hints in Python and their importance in the ecosystem through this 37-minute PyCon US sponsor workshop. Learn how to implement type hints incrementally, use tools like mypy for checking, and incorporate them into CI/CD pipelines. Dive into hands-on examples, starting with simple cases and progressing to complex data structures, circular type references, and debugging techniques. Discover easy ways to add type hints to class definitions using typing.NamedTuple and @dataclass decorator. Gain insights on writing stubs for libraries without type hints and when to use the type: ignore comment. Apply these concepts to enhance the classic Fizz-Buzz game, refactoring code for clarity and simplicity while addressing common sources of complexity in type hinting.