title: Is open().read() safe?
body: <p>I write a lot of Python code where I just want to read a file to a variable.  I know the two recommended ways are these - </p>
  
  <pre><code>with open('file') as f:
      data = f.read()
  
  # or
  
  fo = open('file')
  data = f.read()
  fo.close()
  </code></pre>
  
  <p>My questions, is what are the downsides of this?</p>
  
  <pre><code>data = open('file').read()
  </code></pre>