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