@@ -1595,7 +1595,7 @@ msgstr "重命名布尔转换的 C 层级槽位和方法: ``nb_nonzero`` 现在
1595
1595
msgid ""
1596
1596
"Removed :c:macro:`!METH_OLDARGS` and :c:macro:`!WITH_CYCLE_GC` from the C "
1597
1597
"API."
1598
- msgstr ""
1598
+ msgstr "从 C API 中移除了 :c:macro:`!METH_OLDARGS` 和 :c:macro:`!WITH_CYCLE_GC`。 "
1599
1599
1600
1600
#: ../../whatsnew/3.0.rst:886
1601
1601
msgid "Performance"
@@ -1608,6 +1608,8 @@ msgid ""
1608
1608
"biggest cause is the removal of special-casing for small integers. There's "
1609
1609
"room for improvement, but it will happen after 3.0 is released!"
1610
1610
msgstr ""
1611
+ "综合而言 3.0 的改变使得 Python 3.0 运行 pystone 基准测试的速度比 Python 2.5 慢了约 10%。 "
1612
+ "其中最大的原因可能是移除了针对小整数的特别场景的处理。 虽然存在改进空间,但这将在 3.0 发布之后再进行!"
1611
1613
1612
1614
#: ../../whatsnew/3.0.rst:898
1613
1615
msgid "Porting To Python 3.0"
@@ -1617,17 +1619,18 @@ msgstr "移植到 Python 3.0"
1617
1619
msgid ""
1618
1620
"For porting existing Python 2.5 or 2.6 source code to Python 3.0, the best "
1619
1621
"strategy is the following:"
1620
- msgstr ""
1622
+ msgstr "对于将现有 Python 2.5 或 2.6 源代码移植到 Python 3.0,最佳的策略如下: "
1621
1623
1622
1624
#: ../../whatsnew/3.0.rst:903
1623
1625
msgid "(Prerequisite:) Start with excellent test coverage."
1624
- msgstr ""
1626
+ msgstr "(必要前提:)启动良好的测试覆盖。 "
1625
1627
1626
1628
#: ../../whatsnew/3.0.rst:905
1627
1629
msgid ""
1628
1630
"Port to Python 2.6. This should be no more work than the average port from "
1629
1631
"Python 2.x to Python 2.(x+1). Make sure all your tests pass."
1630
1632
msgstr ""
1633
+ "移植到 Python 2.6。 这应该不会比从 Python 2.x 到 Python 2.(x+1) 的正常移植更麻烦。 请确保所有的测试均能通过。"
1631
1634
1632
1635
#: ../../whatsnew/3.0.rst:909
1633
1636
msgid ""
@@ -1636,13 +1639,17 @@ msgid ""
1636
1639
"Run your test suite again, and fix code that you get warnings about until "
1637
1640
"there are no warnings left, and all your tests still pass."
1638
1641
msgstr ""
1642
+ "(仍然使用 2.6:) 打开 :option:`!-3` 命令行开关。 这将启用针对将在 3.0 中被移除(或修改)的特性的警告。 "
1643
+ "再次运行你的测试套件,并修复你收到相关警告的代码直至不再有任何警告,并且所有的测试仍然能通过。"
1639
1644
1640
1645
#: ../../whatsnew/3.0.rst:915
1641
1646
msgid ""
1642
1647
"Run the ``2to3`` source-to-source translator over your source code tree. "
1643
1648
"Run the result of the translation under Python 3.0. Manually fix up any "
1644
1649
"remaining issues, fixing problems until all tests pass again."
1645
1650
msgstr ""
1651
+ "对你的源代码树运行 ``2to3`` 源代码翻译器。 在 Python 3.0 中运行翻译后的结果。 "
1652
+ "手动修复任何剩余的问题,一至修复到所有的测试再度通过。"
1646
1653
1647
1654
#: ../../whatsnew/3.0.rst:920
1648
1655
msgid ""
@@ -1654,6 +1661,9 @@ msgid ""
1654
1661
"the source code and running the ``2to3`` translator again, rather than "
1655
1662
"editing the 3.0 version of the source code."
1656
1663
msgstr ""
1664
+ "不建议尝试编写可不加修改地同时运行于 Python 2.6 和 3.0 的源代码;你将不得不使用一种非常扭曲的代码风格,例如避免 ``print`` "
1665
+ "语句、元类和许多其他特性。 如果你正在维护需要同时支持 Python 2.6 和 Python 3.0 的库,最佳做法是将上述的步骤 3 "
1666
+ "修改为编辑源代码的 2.6 版本并再次运行 ``2to3`` 翻译器,而不是修改源代码的 3.0 版本。"
1657
1667
1658
1668
#: ../../whatsnew/3.0.rst:929
1659
1669
msgid ""