Content deleted Content added
→Language constructs: The C#, Python, and Java examples are for resources held in one block of code. Is there a citation for the viral aspect where object A holding a reference to disposable object B also needs to be disposable? |
Rephrase paragraph about Python "with" statement, change plain link to reference |
||
Line 55:
</source>
Similarly, the [[Python (programming language)|Python]] language has a <code>with</code> statement that can be used to similar effect with a ''context manager'' object. The ''context manager protocol''
<source lang="python">
with resource_context_manager() as resource:
|