Docs with Type Hints • From the docstring using the Sphinx autodoc extension
16
Type Hints for Your Public APIs
17
From Simple to Complex
18
Liberal vs Conservative
19
Type Hints in Your Code • Type hints in Python 3 function annotations It's enough to pip install a library • Compatible with Python 3.5
20
Python Stubs
21
Available Type Hints
22
Try Type Hints!
Description:
Discover the benefits of type hints in Python through this informative conference talk from EuroPython 2015. Explore how PEP 484 introduces type hints for Python 3, enhancing code readability for both humans and tools. Learn practical examples of type hint usage, their value in public APIs, and how they can lead to better and safer outcomes. Gain insights into using simple class types and built-in collection types for public APIs, and understand the advantages of type hinting stubs for third-party libraries. Delve into topics such as informal type hints, function annotations, type checking, type inference, code completion, and documentation improvements. Examine the ElementTree API as a practical example, and explore the spectrum from simple to complex type hints. Understand the liberal vs. conservative approaches to type hinting, and learn how to implement type hints in your own code using Python 3 function annotations. Discover available type hints and leave inspired to try them in your Python projects.
Read more