TypeError: expected a character buffer object When execute a translate function
<p>It's for removing punctuation of a <code>str</code>.</p>

<pre><code>tbl = dict.fromkeys(i for i in xrange(sys.maxunicode)
                      if unicodedata.category(unichr(i)).startswith('P'))
def remove_punctuation(text):
    return text.translate(tbl)

remove_punctuation(',')
</code></pre>

<p>But it shows the error message when i run the code:</p>

<pre><code>Traceback (most recent call last):
  File "C:/Users/user/PycharmProjects/untitled2/is_include.py", line 22, in &lt;module&gt;
    remove_punctuation('')
  File "C:/Users/user/PycharmProjects/untitled2/is_include.py", line 20, in remove_punctuation
    return text.translate(tbl)
TypeError: expected a character buffer object
</code></pre>