TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Twisted and Python 3

3 点作者 ash将近 9 年前

2 条评论

theophrastus将近 9 年前
For myself this is the money quote of that worthy posting:<p>&quot;There are effectively three string types in the Python [3] world: bytes, Unicode strings, and strings. And there are inconsistencies among them. For example, sys.path() returns bytes on Unix, but strings on other operating systems. In addition, cgi.parse_multipart() returns strings on Python 3, which is just wrong.&quot;<p>It&#x27;d be edifying to read about how this is a better situation (in python 3 versus 2) and&#x2F;or how it might be ameliorated.
ubernostrum将近 9 年前
<i>Python 3 lacks explicit Unicode strings using the u&#x27;&#x27; notation</i><p>This at least is factually wrong; Python 3.3 made the &#x27;u&#x27; prefix legal syntax again. On Python 3 it&#x27;s effectively a no-op, since an un-prefixed string literal would be a Unicode string anyway on Python 3.