PythonHub
2.49K subscribers
2.35K photos
49.9K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Better Python tests with inline-snapshot

Learn how Pydantic uses inline-snapshot and dirty-equals for better testing.

https://pydantic.dev/articles/inline-snapshot
Python 3.12 vs 3.13 vs 3.14: What Changed and Which Should You Use

Compare Python 3.12, 3.13, and 3.14 side by side. See what changed across free-threading, JIT, t-strings, performance, and library support plus which version you should actually use in 2026.

https://releaserun.com/python-3-12-vs-3-13-vs-3-14-comparison/
Stop Building Ugly APIs: Use the Fluent Interface Pattern

The video walks through refactoring a small Python animation API from a clunky configuration style into a fluent interface that reads like a story using method chaining and domain specific methods. It also explains what the fluent interface pattern is, how it differs from the builder pattern, where it already appears in Python, and when it is appropriate or inappropriate to use.

https://www.youtube.com/watch?v=f1Nb_JV_s8Y
Rewriting pycparser with the help of an LLM

Eli describes how he used an LLM coding agent (Codex) to help rewrite the popular Python C parser pycparser, replacing its old PLY based parser with a hand-written recursive descent parser that passes the full test suite and is easier to maintain. He found the experience efficient and insightful, noting the agent did most of the heavy work in far less time than doing it manually while hi...

https://eli.thegreenplace.net/2026/rewriting-pycparser-with-the-help-of-an-llm/
Calling Lean Functions As Python Functions

Philip Zucker introduces leancall, a Python library designed to bridge the gap between Lean 4 and Python by allowing Lean functions to be called as native Python functions. He demonstrates its utility through practical examples like balancing a Cartpole in a reinforcement learning environment and building a ray tracer, highlighting Lean's performance benefits while leveraging Python's va...

https://www.philipzucker.com/leancall/