try/except — catching what AI didn't — step 7 of 9
This function is meant to look up a key in a dict and return a default if
the key isn't there. AI wrote except ValueError, which never matches,
so the missing-key case still crashes. Fix the exception class on line 3
so the script prints unknown.
The break is on line 4 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
This function is meant to look up a key in a dict and return a default if
the key isn't there. AI wrote except ValueError, which never matches,
so the missing-key case still crashes. Fix the exception class on line 3
so the script prints unknown.
The break is on line 4 — but read the whole snippet first.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.