Skip to main content

uast

This page describes how gopy implements ast. The design follows CPython page-for-page. For the upstream reference see cpython/ast.

Source map

The Go code lives at the module root in flat packages.

PackageRole
(TBD)Mirror of the matching CPython source file.

Differences from CPython

Notes on places where gopy intentionally diverges from CPython.
  • Go's GC owns memory. There is no Py_INCREF / Py_DECREF.
  • Bytecode layout, opcodes, and error messages match CPython 3.14 byte for byte.
  • Goroutines back the C threads model where it shows through.

Status

See the status table for which functions in this subsystem are ported and which are pending.

Cross reference

  • CPython companion: cpython/ast.
  • Spec: see ~/notes/Spec/1700/ for the port spec covering this subsystem.