title: how to convert Python 2 unicode() function into correct Python 3.x syntax
body: <p>I enabled the compatibility check in my Python IDE and now I realize that the inherited Python 2.7 code has a lot of calls to <code>unicode()</code> which are not allowed in Python 3.x.</p>
  
  <p>I looked at the <a href="https://docs.python.org/2/library/functions.html#unicode" rel="noreferrer">docs</a> of Python2 and found no hint how to upgrade: </p>
  
  <p>I don't want to switch to Python3 now, but maybe in the future.</p>
  
  <p>The code contains about 500 calls to <code>unicode()</code></p>
  
  <p>How to proceed?</p>
  
  <p><strong>Update</strong></p>
  
  <p>The comment of user vaultah to read the  <a href="https://docs.python.org/3/howto/pyporting.html" rel="noreferrer">pyporting</a> guide has received several upvotes.</p>
  
  <p>My current solution is this (thanks to Peter Brittain):</p>
  
  <pre><code>from builtins import str
  </code></pre>
  
  <p>... I could not find this hint in the pyporting docs.....</p>