title: Python 3: gzip.open() and modes
body: <p><a href="https://docs.python.org/3/library/gzip.html" rel="noreferrer">https://docs.python.org/3/library/gzip.html</a></p>
  
  <p>I am considering to use <code>gzip.open()</code>, and I am a little confused about the <code>mode</code> argument: </p>
  
  <blockquote>
    <p>The mode argument can be any of 'r', 'rb', 'a', 'ab', 'w', 'wb', 'x'
    or 'xb' for binary mode, or 'rt', 'at', 'wt', or 'xt' for text mode.
    The default is 'rb'.</p>
  </blockquote>
  
  <p>So what is the difference between <code>'w'</code> and <code>'wb'</code>? </p>
  
  <p>The document states they are both <em>binary mode</em>. </p>
  
  <p>So does that mean that there is no difference between <code>'w'</code> and <code>'wb'</code>?</p>