Skip to main content

gopy

A from-scratch CPython 3.14, written in Go. Same bytecode, same objects, same error messages.

Read the manualCPython internalsgopy internals

What gopy is

gopy compiles and runs Python 3.14 source. It uses the same PEG grammar, the same bytecode layout, and the same eval loop structure as CPython. Where CPython has a function in C, gopy has the same function in Go, ported with citations back to the C source.

Reading order

  1. Install and run a hello-world.
  2. Skim the CPython pillar. It is the source of truth. Even readers who have never touched gopy can learn how CPython 3.14 works from these pages.
  3. Cross-read the gopy pillar. Each page mirrors its CPython counterpart and notes Go-specific differences.
  4. Use the reference tables for quick lookups: opcodes, types, builtins, errors.

Status

See the subsystem status table for which parts of CPython have been ported and which are still in flight.