docs: add Coming-from-Python section + fix stale counts - #1
Conversation
Adds a "Coming from Python" on-ramp table (verified against the repo's own examples/ and tests) and corrects suite/test-count accuracy issues. Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 Independent Claude review: Needs-work (one blocking accuracy issue; all fenced code snippets verified clean). Verified against
Blocking — misleading API capability (Coming-from-Python, final paragraph):
Fix: drop that sentence, or reword to note |
The section's closing sentence claimed `parse_template(source)` returns a reusable `Template` "if you want to render the same source repeatedly." That API is not public: `parse_template`/`Template` live in `template.parser` and are not re-exported from the `template` package (only `render`, `escape_html`, `TemplateValue`, and `Context` are), so `from template import parse_template` would fail — and `Template` has no render method anyway. Reword to describe the real, exported public API: the single `render(source, context)` entry point, which compiles and renders in one call. Every snippet in the section now uses only exported symbols. Co-Authored-By: Claude <noreply@anthropic.com>
|
Docs review (sonnet): CHANGES-NEEDED Most claims check out ( Finding — the new "Coming from Python" section says |
Summary
Two documentation changes:
the intro) mapping the familiar Python API to this library's real API.
Every snippet was extracted from this repo's own
examples/andtest/;nothing was invented.
Test counts were re-verified by actually counting the test functions in the
repo (not trusting the prior text).
From an automated review (personal-context#62); drafted by Claude Code — please review the Coming-from-Python snippets for API accuracy.