Profile Picture

The Baffled Architect

Every day is a school day

Python’s with statement

CodingPythonSnippet

Managing resources usually involves three steps – allocating, using, and releasing. You’re familiar with the try... finally pattern but Python also provides context managers.

Continue reading “Python’s with statement”
Newer Posts
Proudly powered by WordPress | Theme: dougiewougie-theme by Gemini.