title: Does Python's tarfile.open need close()?
body: <p>In the official python documentation of <a href="https://docs.python.org/2/library/tarfile.html">tarfile</a> I don't see wether a tarfile created with</p>
  
  <pre class="lang-python prettyprint-override"><code>tarfile.open('example.tar', 'r:*')
  </code></pre>
  
  <p>should be closed once you don't need it anymore.<br>
  In some other examples (e.g. <a href="http://pymotw.com/2/tarfile/">here</a>) you often see the tarfile not to be closed.</p>
  
  <p>Do I run into problems if I open the same tarfile more often in some functions without always closing it?</p>
  
  <pre class="lang-python prettyprint-override"><code>def example(name):
      f = tarfile.open(name, 'r:*')
      # do some other stuff
      # not closing the tarfile object
      return result
  
  example('example.tar')
  example('example.tar')
  </code></pre>
  
  <p>Is there a difference in opening a tarfile in 'r' instead of 'w' mode (except the obvious read/write)?<br>
  Cause in the examples they always close the tarfile if it was opened with write mode 'w'?</p>