Skip to content

docs: the card, in tables and programs - #245

Merged
jonruttan merged 1 commit into
mainfrom
docs/card
Nov 20, 2026
Merged

jonruttan merged 1 commit into
mainfrom
docs/card

Conversation

@jonruttan

Copy link
Copy Markdown
Owner

x-python gains its card, docs/card.md: the reference page, in tables and programs that are run.

The page

  • Run. A program run from a file with -f, the program itself, and the ways in.
  • Values, Operators. The types and how each is written; arithmetic, comparison, logic, bits.
  • Strings. Indexing, slicing and methods; f-strings, % and .format.
  • Collections. Lists, tuples and unpacking, dicts, sets.
  • Control. if, for, while, a loop's else; try, except, finally, raise.
  • Functions. Defaults, *args, **kw, keyword-only, lambda, closures; decorators and generators.
  • Classes. Inheritance, super, the special methods, @property, @classmethod, with.
  • Modules. The import forms, the twelve modules, the builtins.
  • Differs. Against CPython.

Each program line carries what it prints in a # -> comment, and every one is what CPython prints.

Changes

  • docs/card.md: the page.
  • tests/card-run.sh: runs one program, x -l python -f FILE.
  • tests/card/fact.py: what the page's command line runs.
  • Makefile: make card.
  • README.md: the target and the page.
  • .github/workflows/ci.yml: the boot job checks the card, on both legs. This bundle's workflow is its own; the platform's bundle.yml has the step, and these two are that step's.

Verified

card: ok (384 rows, 1 shell rows run, 17 programs run, 0 rows in other fences not run here)     on v0.59.0

Not verified

  • The tables are checked by nothing: only the fences run.
  • The CI step has not run before this pull request. It installs the platform on the runner, which this workflow has not done.
  • The suite was not run here: nothing under python/ changed.

🤖 Generated with Claude Code

docs/card.md is the reference page: values, operators, strings,
collections, control, functions, classes and modules in tables, and
seventeen programs that are run, each line beside what it prints. The
expectations are what CPython prints.

tests/card-run.sh runs one program with -f. tests/card/fact.py is what
the page's command line runs. make card holds the page to the format,
and the boot job in CI runs the check: this bundle's workflow is its
own, not the platform's bundle.yml, which has the step.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@jonruttan
jonruttan merged commit 2f46536 into main Nov 20, 2026
12 checks passed
@jonruttan
jonruttan deleted the docs/card branch November 20, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant