Lesson 3 of 8
Lists & Dictionaries
Concept
A list is an ordered collection — use square brackets
[]. A dictionary (dict) maps keys to values — use curly braces {}. Your mesh config uses both constantly.
m3shdup/app/intrinsic.py
# List — ordered, access by position (0-based)
prefetch = ["/api/agents", "/api/tasks?limit=10"]
first = prefetch[0] # "/api/agents"
count = len(prefetch) # 2
# Dict — access by key name
task = {
"title": "Security surface scan",
"capability": "research",
"cooldown_hours": 24,
}
name = task["title"] # "Security surface scan"
task["priority"] = -1 # add a new key
What's happening
Lists are for ordered sequences (endpoints to check, files to sync). Dicts are for named properties (a task's title, capability, cooldown). Your IDLE_TASKS in intrinsic.py is a list of dicts — each task definition is a dict, and they're collected in a list.