On this page

One book one conduit๏ƒ

๐ŸŸข Beginner ยท Lesson 36

One book conjures ONE conduit, ever (probe-proven: a second conjure raises RuntimeError). Multiple scopes come from lesser conduits; multiple roots come from multiple books.

Before you run๏ƒ

Use the Beginner guide for prerequisite concepts. Run from a checkout with Melder installed and Python 3.14 free-threading selected. The collection download includes the level's local helper modules.

Run the saved script๏ƒ

python UX_and_AIX_experiences/01_beginner/36_one_book_one_conduit.py
py -3.14t UX_and_AIX_experiences/01_beginner/36_one_book_one_conduit.py

Download this collection ยท Source on GitHub

Public surface๏ƒ

the single-conjure law, lesser conduits, second book

Code๏ƒ

 1"""
 2TIER: beginner (36)
 3GOAL: One book conjures ONE conduit, ever (probe-proven: a second
 4      conjure raises RuntimeError). Multiple scopes come from lesser
 5      conduits; multiple roots come from multiple books.
 6SURFACE EXERCISED: the single-conjure law, lesser conduits, second book
 7"""
 8import melder as md
 9
10
11class WorldState:
12    pass
13
14
15def main() -> None:
16    book = md.Spellbook()
17    book.bind(spell=WorldState, existence="unique")
18    root = book.conjure()
19
20    try:
21        book.conjure(name="second")
22        print("second conjure unexpectedly succeeded")
23    except RuntimeError as err:
24        print("single-conjure law held:", str(err).split(".")[0])
25
26    # scopes within the world: lesser conduits
27    child = root.create_lesser_conduit()
28    assert root.meld(spell=WorldState) is child.meld(spell=WorldState)
29    print("scopes via lesser conduits; roots via separate books")
30
31
32if __name__ == "__main__":
33    main()

Check the outcome๏ƒ

The script contains its own assertions or demonstrated refusal paths. Run it to evaluate those checks against your installed version. The code above is taken directly from the saved file; no run output is invented here.

More beginner examples ยท Level guide