open() — and the with-block AI keeps forgetting — step 6 of 9
Claude wrote this without a with block, so the file handle leaks if the
read raises. Rewrite the body using with open(...) as f: so the file
closes automatically. The script should still print promptdojo.
The break is on lines 4, 5, 6 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
Claude wrote this without a with block, so the file handle leaks if the
read raises. Rewrite the body using with open(...) as f: so the file
closes automatically. The script should still print promptdojo.
The break is on lines 4, 5, 6 — 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.