Python Type Checking

In this course, you’ll learn about Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently.

In this tutorial, you’ll learn about:

  • Type annotations and type hints
  • Adding static types to code, both your code and the code of others
  • Running a static type checker
  • Enforcing types at runtime

You’ll go on a tour of how type hints work in Python and find out if type checking is something you want to use in your code. If you want to learn more, you can check out the resources that will be linked to throughout this course.

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Christopher Bailey

Chris is an avid Pythonista and creates video tutorials for Real Python. He is a programmer and data analyst. He creates music under the name Tripnet. Chris lives in Colorado with his wife and two dogs.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for glenferguson

glenferguson on Oct. 9, 2021

I have been using type hints for years and still learned something new in the video. Specifically, adding alias for types :)

« Browse All Courses