On this page
Required vocabulary๏
๐ข Beginner ยท Lesson 31
existence is not optional - the bind vocabulary is explicit by design. Forgetting it fails LOUDLY at bind time, not quietly at meld time. The error type is printed for the record.
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/31_required_vocabulary.py
py -3.14t UX_and_AIX_experiences/01_beginner/31_required_vocabulary.py
Public surface๏
bind() required kwargs, fail-fast law
Code๏
1"""
2TIER: beginner (31)
3GOAL: existence is not optional - the bind vocabulary is explicit by
4 design. Forgetting it fails LOUDLY at bind time, not quietly at
5 meld time. The error type is printed for the record.
6SURFACE EXERCISED: bind() required kwargs, fail-fast law
7"""
8import melder as md
9
10
11class Forgotten:
12 pass
13
14
15def main() -> None:
16 book = md.Spellbook()
17 try:
18 book.bind(spell=Forgotten) # deliberately missing existence
19 print("bind without existence unexpectedly succeeded")
20 except TypeError as err:
21 print("missing existence fails fast: TypeError -", err)
22 except Exception as err:
23 print("missing existence fails fast:", type(err).__name__, "-", err)
24
25 try:
26 book.bind(spell=Forgotten, existence="not-a-lifecycle")
27 print("bogus existence string unexpectedly accepted")
28 except Exception as err:
29 print("bogus existence string refused:", type(err).__name__)
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.