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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Python: language moratorium is lifted

113 点作者 prog大约 14 年前

4 条评论

gjm11大约 14 年前
In case anyone's wondering about the two PEPs GvR mentions:<p>PEP 380 (<a href="http://www.python.org/dev/peps/pep-0380/" rel="nofollow">http://www.python.org/dev/peps/pep-0380/</a>) would provide a convenient way for one generator function to yield all the values of another as part of its work. At the moment you have to say something like<p><pre><code> for x in foo: yield x </code></pre> which isn't all that bad in itself but breaks down when your caller starts sending values back to you, coroutine-style. (Because they go to foo and you never get to see them.)<p>PEP 3152 (<a href="http://www.python.org/dev/peps/pep-3152/" rel="nofollow">http://www.python.org/dev/peps/pep-3152/</a>) uses the generator mechanism (as enhanced by PEP 380) which already provides something rather like coroutines, and adds some syntactic sugar to let you write coroutines that <i>look</i> like coroutines.
dalke大约 14 年前
Quoting from PEP 303:<p>This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but allow Python 3.3 (assuming it is not released prematurely) to once again include language changes.<p>Python 3.2 is newly released and 3.3 development has started.
评论 #2265248 未加载
Jach大约 14 年前
Did anyone else think "Wow, 2 years already"? (I remember people claiming the moratorium was a signal of Python's demise...)<p>I'm happy about PEP 380, it seems like they might as well do PEP 3152 as well since they're highly related...
anonymoushn大约 14 年前
This is somewhat disappointing. Python's lack of full-fledged coroutines is most of what keeps me using Lua.
评论 #2265433 未加载
评论 #2266466 未加载
评论 #2265923 未加载