Skip to main content

Module py

Module py 

Source
Expand description

Python code generator — rule-based (Tier 2) transpilation from AIR to Python.

Handles all capability gaps:

  • Records → @dataclass classes
  • Algebraic types → dataclasses with _tag discriminant
  • Pattern matching → native match/case (Python 3.10+)
  • Effects → keyword arguments
  • Ownership → erased (Python is GC)
  • Generics → erased (Python uses runtime typing)
  • Type hints on all declarations

Structs§

PyGenerator
Python code generator implementing the CodeGenerator trait.