擅长:python、mysql、java
<p>基本上,因为空字符串不是<code>None</code>的表示。None是与空字符串或任何其他内容不同的特殊值。如<a href="http://docs.python.org/2/library/functions.html#str" rel="nofollow">the docs</a>所述,<code>str</code>应该</p>
<blockquote>
<p>Return a string containing a nicely printable representation of an object.</p>
</blockquote>
<p>基本上,<code>str</code>应该返回可打印和可读的内容。空字符串不是<code>None</code>的可读表示形式。</p>