// the take
MacroPy brings Lisp/Scala-style syntactic macros to Python: it hooks the import system to rewrite a module's AST at import time, and ships a pile of language extensions built on that mechanism (quasiquotes, case classes, tail-call optimization, PEG parsing, quick lambdas, string interpolation). It's for people curious about language/metaprogramming internals, or who want a specific feature like hygienic macros or case classes and are willing to accept the cost.
The core machinery is a real implementation of hygienic macros (gen_sym-based variable capture avoidance), not a text-substitution hack - that's genuinely hard to get right and most Python macro attempts don't bother. It's also a good showcase of what's possible by hooking the AST pipeline: quasiquotes, PEG combinators, and TCO are each built on the same general macro infrastructure rather than being one-off tricks. Test coverage per-feature (separate test dirs for quotes, walkers, tracing, hygiene) is more thorough than you'd expect from a project this niche.
It's permanently stuck at 1.1.0b2 - started as a 2013 MIT class project and never reached a stable release, which tells you something about how much production hardening it's gotten. Rewriting ASTs at import time is exactly the kind of magic that breaks debuggers, IDE tooling, and type checkers, and makes stack traces point at code you didn't write - teams adopting this are trading readability for cleverness. Several of the more interesting bits (pattern matching, PINQ, pyxl, TCO, JS snippets) live under `experimental/` and are labeled as such, so the stable surface is smaller than the feature list suggests. Python's AST module and import hooks change across versions, and projects like this historically break on new CPython releases - there's no indication here it's been kept current with anything recent.
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →