Contribute Media
A thank you to everyone who makes this possible: Read More

Type Annotations in Python 3: Whats, whys & wows!

Description

Python 3.5 introduced support for "type hints" (or annotations), which allows us to annotate our code with useful bits of information without affecting its runtime behavior. Type hints don't enforce a particular use case and can therefore be used for many purposes.

In my talk, I will explain some of the use cases of type hints, and show how we can use them to e.g. make our code more secure or teach it new tricks. We will have a look at popular libraries that help us to use the power of type hints (e.g. mypy), but we will also see how we can build our own extensions on top of the type hint system.

After the talk you should walk away with a solid (basic) understanding of type hints in Python and an idea of how they might be useful to you now or in the future.

  • Typing and type hints in programming languages
  • Short history and motivation of type hints in Python
  • Basics of type hint syntax and semantics
  • Use cases for type hints
  • Type hints for code analysis: mypy and similar libraries
  • Building new stuff with type hints in Python
  • Summary, Outlook & Further Reading

Details

Improve this page