Closed dicej closed 8 months ago
Per https://docs.python.org/3/library/stdtypes.html#typecontextmanager, the idiomatic way to represent resource types is as context managers, each with an __exit__ method that drops the resource. This will allow them to be used in with statements.
__exit__
with
Per https://docs.python.org/3/library/stdtypes.html#typecontextmanager, the idiomatic way to represent resource types is as context managers, each with an
__exit__
method that drops the resource. This will allow them to be used inwith
statements.