title: Difference between open and codecs.open in Python
body: <p>There are two ways to open a text file in Python:</p>
  
  <pre><code>f = open(filename)
  </code></pre>
  
  <p>And</p>
  
  <pre><code>import codecs
  f = codecs.open(filename, encoding="utf-8")
  </code></pre>
  
  <p>When is <code>codecs.open</code> preferable to <code>open</code>?</p>