title: Python3 and ASCII
body: <p>I am learning python, and I am a bit confused about contents.encode() in init() in the following code. </p>
  
  <pre><code>PY3 = sys.version_info[0] &gt; 2
  
  
  class Test:
      def __init__(self):
          self.contents = ''
          if PY3:
              self.contents = self.contents.encode('ascii')
  </code></pre>