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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Moving to Python 3

32 点作者 bitsai超过 14 年前

3 条评论

IgorPartola超过 14 年前
There is <i>fundamental</i> a difference between Unicode and UTF-8/16/32. Unicode says nothing at all about how strings should be stored in memory. It is just a set of symbols and code-points. On the other hand, UTF-8/16/32 are implementations of Unicode. See <a href="http://en.wikipedia.org/wiki/Unicode#Mapping_and_encodings" rel="nofollow">http://en.wikipedia.org/wiki/Unicode#Mapping_and_encodings</a> for others.<p>Statements like "first 256 code points in Unicode map to Latin-1" make little sense. They are true if you s/Unicode/UTF-8/g. However, they are not true for other encodings such as ones that use 2 or 4 bytes per character. There 'abcd' is not 4 bytes, but 8 or 16.
评论 #2218765 未加载
评论 #2218668 未加载
samuel超过 14 年前
"Python 3 is unarguably a better language than Python 2."<p>I would say that's unarguably marginally better. What provides Python 3 that I miss in Python 2? For me nothing at all. Ok, dealing with Unicode it's easier. So what? Optional type annotations, that's something I would miss.
评论 #2218774 未加载
评论 #2218908 未加载
评论 #2219288 未加载
runjake超过 14 年前
Two words: Django.<p>Ok, that's only one word, but that's my only hold-up for moving to Python3.