Gradual Typing of Production Applications
Explore gradual typing in production Python applications through this comprehensive conference talk from code::dive 2017. Delve into the benefits of annotating Python code with types, understand the differences between type check errors and runtime errors, and learn about advanced typing concepts beyond simple class annotations. Discover how to handle various function return scenarios, including returning anything, specific types, or values of the same type as the input. Examine techniques for specifying complex input requirements, such as lists with string elements or functions accepting classes instead of objects. Gain insights into type inference, gradual typing workflows, and file-level vs. full program analysis. Address common gotchas in typed Python, including limitations of unions and mutable collections. Conclude with a discussion on where to find support for implementing gradual typing in your projects.