title: NameError: global name 'unicode' is not defined - in Python 3
body: <p>I am trying to use a Python package called bidi. In a module in this package (algorithm.py) there are some lines that give me error, although it is part of the package.</p>
  
  <p>Here are the lines:</p>
  
  <pre><code># utf-8 ? we need unicode
  if isinstance(unicode_or_str, unicode):
      text = unicode_or_str
      decoded = False
  else:
      text = unicode_or_str.decode(encoding)
      decoded = True
  </code></pre>
  
  <p>and here is the error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#25&gt;", line 1, in &lt;module&gt;
      bidi_text = get_display(reshaped_text)
    File "C:\Python33\lib\site-packages\python_bidi-0.3.4-py3.3.egg\bidi\algorithm.py",   line 602, in get_display
      if isinstance(unicode_or_str, unicode):
  NameError: global name 'unicode' is not defined
  </code></pre>
  
  <p>How should I re-write this part of the code so it works in Python3?
  Also if anyone have used bidi package with Python 3 please let me know if they have found similar problems or not. I appreciate your help.</p>