Skip to content

docs: add Coming-from-Python section + fix stale counts - #1

Merged
conorbronsdon merged 1 commit into
mainfrom
docs/python-onramp-and-accuracy
Jul 6, 2026
Merged

docs: add Coming-from-Python section + fix stale counts#1
conorbronsdon merged 1 commit into
mainfrom
docs/python-onramp-and-accuracy

Conversation

@conorbronsdon

Copy link
Copy Markdown
Owner

Summary

Two documentation changes:

  1. Coming from Python — a short side-by-side section (near the top, after
    the intro) mapping the familiar Python API to this library's real API.
    Every snippet was extracted from this repo's own examples/ and test/;
    nothing was invented.
  2. Accuracy fixes — Suite copy Ten -> Eleven and added mojo-xml link. Test count re-verified by counting: 23 unit tests (matches README; conformance rows unchanged).

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.

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>
@conorbronsdon

Copy link
Copy Markdown
Owner Author

🤖 Independent Claude review: Ready.

Verified every Mojo snippet against src/unicodedata/normalize.mojo — no invented APIs:

  • Table: normalize(form, s) (L208), is_normalized(form, s) (L224), casefold(s) (L218) — all real module-level fns, all exported in __init__.mojo.
  • Prose: Normalizer() + .normalize(form, s) / .casefold(s) — real (struct L66, __init__ L71, normalize L174, casefold L189).

Other checks:

  • Python side is idiomatic: unicodedata.normalize, unicodedata.is_normalized (3.8+), and pairing str.casefold()casefold(s) is correct (Python's unicodedata has no casefold).
  • "Eleven libraries": 10 listed siblings + mojo-unicodedata itself (not self-listed) = 11 — consistent with the prior "Ten"/9-bullet convention.
  • New mojo-xml cross-link resolves (repo exists, public).

No wrong counts, no non-existent APIs.

@conorbronsdon
conorbronsdon marked this pull request as ready for review July 6, 2026 07:58
@conorbronsdon

Copy link
Copy Markdown
Owner Author

Docs review (sonnet): SHIP

Coming-from-Python table (normalize("NFC", s), is_normalized(...), casefold(s), Normalizer() reuse) matches src/unicodedata/normalize.mojo signatures exactly. 23-test count verified. Suite Ten→Eleven arithmetic correct. No issues.

@conorbronsdon
conorbronsdon merged commit 603f5af into main Jul 6, 2026
1 check passed
@conorbronsdon
conorbronsdon deleted the docs/python-onramp-and-accuracy branch July 6, 2026 08:13
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