@@ -1595,7 +1595,7 @@ msgstr "重命名布尔转换的 C 层级槽位和方法: ``nb_nonzero`` 现在
15951595msgid ""
15961596"Removed :c:macro:`!METH_OLDARGS` and :c:macro:`!WITH_CYCLE_GC` from the C "
15971597"API."
1598- msgstr ""
1598+ msgstr "从 C API 中移除了 :c:macro:`!METH_OLDARGS` 和 :c:macro:`!WITH_CYCLE_GC`。 "
15991599
16001600#: ../../whatsnew/3.0.rst:886
16011601msgid "Performance"
@@ -1608,6 +1608,8 @@ msgid ""
16081608"biggest cause is the removal of special-casing for small integers. There's "
16091609"room for improvement, but it will happen after 3.0 is released!"
16101610msgstr ""
1611+ "综合而言 3.0 的改变使得 Python 3.0 运行 pystone 基准测试的速度比 Python 2.5 慢了约 10%。 "
1612+ "其中最大的原因可能是移除了针对小整数的特别场景的处理。 虽然存在改进空间,但这将在 3.0 发布之后再进行!"
16111613
16121614#: ../../whatsnew/3.0.rst:898
16131615msgid "Porting To Python 3.0"
@@ -1617,17 +1619,18 @@ msgstr "移植到 Python 3.0"
16171619msgid ""
16181620"For porting existing Python 2.5 or 2.6 source code to Python 3.0, the best "
16191621"strategy is the following:"
1620- msgstr ""
1622+ msgstr "对于将现有 Python 2.5 或 2.6 源代码移植到 Python 3.0,最佳的策略如下: "
16211623
16221624#: ../../whatsnew/3.0.rst:903
16231625msgid "(Prerequisite:) Start with excellent test coverage."
1624- msgstr ""
1626+ msgstr "(必要前提:)启动良好的测试覆盖。 "
16251627
16261628#: ../../whatsnew/3.0.rst:905
16271629msgid ""
16281630"Port to Python 2.6. This should be no more work than the average port from "
16291631"Python 2.x to Python 2.(x+1). Make sure all your tests pass."
16301632msgstr ""
1633+ "移植到 Python 2.6。 这应该不会比从 Python 2.x 到 Python 2.(x+1) 的正常移植更麻烦。 请确保所有的测试均能通过。"
16311634
16321635#: ../../whatsnew/3.0.rst:909
16331636msgid ""
@@ -1636,13 +1639,17 @@ msgid ""
16361639"Run your test suite again, and fix code that you get warnings about until "
16371640"there are no warnings left, and all your tests still pass."
16381641msgstr ""
1642+ "(仍然使用 2.6:) 打开 :option:`!-3` 命令行开关。 这将启用针对将在 3.0 中被移除(或修改)的特性的警告。 "
1643+ "再次运行你的测试套件,并修复你收到相关警告的代码直至不再有任何警告,并且所有的测试仍然能通过。"
16391644
16401645#: ../../whatsnew/3.0.rst:915
16411646msgid ""
16421647"Run the ``2to3`` source-to-source translator over your source code tree. "
16431648"Run the result of the translation under Python 3.0. Manually fix up any "
16441649"remaining issues, fixing problems until all tests pass again."
16451650msgstr ""
1651+ "对你的源代码树运行 ``2to3`` 源代码翻译器。 在 Python 3.0 中运行翻译后的结果。 "
1652+ "手动修复任何剩余的问题,一至修复到所有的测试再度通过。"
16461653
16471654#: ../../whatsnew/3.0.rst:920
16481655msgid ""
@@ -1654,6 +1661,9 @@ msgid ""
16541661"the source code and running the ``2to3`` translator again, rather than "
16551662"editing the 3.0 version of the source code."
16561663msgstr ""
1664+ "不建议尝试编写可不加修改地同时运行于 Python 2.6 和 3.0 的源代码;你将不得不使用一种非常扭曲的代码风格,例如避免 ``print`` "
1665+ "语句、元类和许多其他特性。 如果你正在维护需要同时支持 Python 2.6 和 Python 3.0 的库,最佳做法是将上述的步骤 3 "
1666+ "修改为编辑源代码的 2.6 版本并再次运行 ``2to3`` 翻译器,而不是修改源代码的 3.0 版本。"
16571667
16581668#: ../../whatsnew/3.0.rst:929
16591669msgid ""
0 commit comments