Session

Lee Briggs

Lee Briggs

Staff Community Engineer

Pulumi

What's Your Type? A Real World Use Case for Python Type Hints

Level: Beginner

Type hints for python have been available since Python 3.5, but it’s rare to see the Python type system used in the wild. As a dynamic language, it’s easy to gain the habit of allowing Python programs to “fail fast” and handle type and syntax errors at runtime.

However, when using Python for infrastructure as code, this can start to create a difficult and painful feedback loop for code that is heavily iterated upon.

In this talk, we’ll take a look at how the type system dramatically can improve an infrastructure as code programs, and see how it can improve the feedback loop. Finally, we’ll examine some of the strong and weak parts of the Python type system against other popular languages and make a case for improvements that could benefit the wider python community.