← Lesson
The Critic Does Not Write
Joeven
Run
Reset
Python loads on first run
WRITES = {"edit", "refund", "send_email"} def critic_act(name, issues): if name in WRITES: return {"error": "critic_cannot_write", "name": name} if name != "review": return {"error": "unknown"} if issues: return {"ok": False, "assign": "worker", "issues": issues} return {"ok": True, "assign": "stop"} print(critic_act("edit", ["tests red"])) print(critic_act("review", ["tests red"])) print(critic_act("review", []))
Run to execute this in your browser. Nothing is sent to a server.