Python
You're viewing a free preview. Sign in free to read every tool guide.
Cleanup that always runs The with block from the Files, JSON & YAML page (with open(...) as f:) isn't special syntax just for files — it's the general pattern for "set something up, and guarantee it's torn down…
Context Managers: with, and Cleanup That Always Runs
Sign in free to read this guide, along with the rest of the DevOps Tools library.
Sign in free