On this page

Live creation probe๏ƒ

๐ŸŸก Intermediate ยท Lesson 18

"Is it already alive?" without creating it - has_live_creation mirrors meld's exact lookup but stops before construction. Doc-canon: the no-create probe for agents and diagnostics.

Before you run๏ƒ

Use the Intermediate 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/02_intermediate/18_live_creation_probe.py
py -3.14t UX_and_AIX_experiences/02_intermediate/18_live_creation_probe.py

Download this collection ยท Source on GitHub

Public surface๏ƒ

Conduit.has_live_creation / describe_live_creation_status

Code๏ƒ

 1"""
 2TIER: intermediate (18)
 3GOAL: "Is it already alive?" without creating it - has_live_creation
 4      mirrors meld's exact lookup but stops before construction.
 5      Doc-canon: the no-create probe for agents and diagnostics.
 6SURFACE EXERCISED: Conduit.has_live_creation / describe_live_creation_status
 7"""
 8import melder as md
 9
10
11class ExpensiveEngine:
12    pass
13
14
15def main() -> None:
16    book = md.Spellbook()
17    book.bind(spell=ExpensiveEngine, existence="unique")
18    conduit = book.conjure()
19
20    before = conduit.has_live_creation(spell=ExpensiveEngine)
21    conduit.meld(spell=ExpensiveEngine)
22    after = conduit.has_live_creation(spell=ExpensiveEngine)
23    print("live before meld?", before, "| after?", after)
24    assert after is True and before is False
25    print("status:", conduit.describe_live_creation_status(spell=ExpensiveEngine))
26
27
28if __name__ == "__main__":
29    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 intermediate examples ยท Level guide

API contracts๏ƒ