Static typing versus dynamic typing is one of the oldest debates in software development. In recent years a number of dynamic languages have worked toward a middle ground by adding support for type hints. Python’s type annotations have given rise to an ecosystem of tools that use that type information to validate the correctness of programs and help identify potential bugs. At Instagram they created the Pyre project with a focus on speed to allow for scaling to huge Python projects. In this episode Shannon Zhu discusses how it is implemented, how to use it in your development process, and how it compares to other type checkers in the Python ecosystem.
- Hello and welcome to Podcast.__init__, the podcast about Python’s role in data and science.
- When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With their managed Kubernetes platform it’s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. And now you can launch a managed MySQL, Postgres, or Mongo database cluster in minutes to keep your critical data safe with automated backups and failover. Go to pythonpodcast.com/linode and get a $100 credit to try out a Kubernetes cluster of your own. And don’t forget to thank them for their continued support of this show!
- Your host as usual is Tobias Macey and today I’m interviewing Shannon Zhu about Pyre, a type checker for Python 3 built from the ground up to support gradual typing and deliver responsive incremental checks
- How did you get introduced to Python?
- Can you describe what Pyre is and the story behind it?
- There have been a number of tools created to support various aspects of typing for Python. How would you describe the various goals that they support and how Pyre fits in that ecosystem?
- What are the core goals and notable features of Pyre?
- Can you describe how Pyre is implemented?
- How have the design and goals of the project changed/evolved since you started working on it?
- What are the different ways that Pyre is used in the development workflow for a team or individual?
- What are some of the challenges/roadblocks that people run into when adopting type definitions in their Python projects?
- How has the evolution of type annotations and overall support for them affected your work on Pyre?
- As someone who is working closely with type systems, what are the strongest aspects of Python’s implementation and opportunities for improvement?
- What are the most interesting, innovative, or unexpected ways that you have seen Pyre used?
- What are the most interesting, unexpected, or challenging lessons that you have learned while working on Pyre?
- When is Pyre the wrong choice?
- What do you have planned for the future of Pyre?
Keep In Touch
- shannonzhu on GitHub
- Thank you for listening! Don’t forget to check out our other shows. The Data Engineering Podcast covers the latest on modern data management. The Machine Learning Podcast helps you go from idea to production with machine learning.
- Visit the site to subscribe to the show, sign up for the mailing list, and read the show notes.
- If you’ve learned something or tried out a project from the show then tell us about it! Email email@example.com) with your story.
- To help other people find the show please leave a review on iTunes and tell your friends and co-workers
- PEP 484
- Continuous Integration
- PEP 675 – Arbitrary literal strings
- Gradual Typing
- AST == Abstract Syntax Tree
- Language Server Protocol
- Type Arithmetic
- PyCon: Securing Code With The Python Type System
- PyCon: Type Checked Python In The Real World
- PyCon: Łukasz Lange 2022 Keynote