Pyrefly and ty: Two New Rust-Based Python Type Checkers Emerge

2025-05-27

At PyCon 2025, Meta's Pyrefly and Astral's ty, two new Rust-based Python type checkers, made their debut. Pyrefly aims to be faster, more portable, and more capable than its predecessor, while actively engaging with the open-source community. ty emphasizes a "gradual guarantee," meaning removing type annotations shouldn't cause type errors. Both leverage Ruff for AST parsing and offer command-line and IDE integration. Benchmarks showed ty generally faster, but they differ in type inference and error handling. Pyrefly is more aggressive, potentially catching more errors but also introducing more false positives; ty is more conservative, prioritizing code compatibility. Both are in early alpha, and their future evolution is exciting to watch.

Read more
Development Type Checker

14 Underrated Python Features to Level Up Your Skills

2025-04-23

This article explores 14 lesser-known yet powerful Python features. From type overloading and keyword-only arguments to structural pattern matching and metaclasses, it delves into advanced techniques that can significantly improve code efficiency and readability. Learn how to leverage features like generics for type safety, optimize performance with caching (@cache), and streamline conditional logic with pattern matching. Even seasoned Python developers will discover new tricks and insights to boost their coding prowess.

Read more