@@ -812,19 +812,23 @@ msgid ""
812
812
"corresponding sections in :ref:`whats-new-in-2.6` should be consulted for "
813
813
"longer descriptions."
814
814
msgstr ""
815
+ "由于许多用户可能会直接从 Python 2.5 跳到 Python 3.0,因此本节提醒读者注意最初为 Python 3.0 设计但后来移植到 "
816
+ "Python 2.6 的新特性。 如需更详细的说明请参阅 :ref:`whats-new-in-2.6` 中的相应章节。"
815
817
816
818
#: ../../whatsnew/3.0.rst:488
817
819
msgid ""
818
820
":ref:`pep-0343`. The :keyword:`with` statement is now a standard feature "
819
821
"and no longer needs to be imported from the :mod:`__future__`. Also check "
820
822
"out :ref:`new-26-context-managers` and :ref:`new-module-contextlib`."
821
823
msgstr ""
824
+ ":ref:`pep-0343`。 现在 :keyword:`with` 语句已是一个标准特性而不再需要从 :mod:`__future__` 导入。 "
825
+ "另请参阅 :ref:`new-26-context-managers` 和 :ref:`new-module-contextlib`。"
822
826
823
827
#: ../../whatsnew/3.0.rst:493
824
828
msgid ""
825
829
":ref:`pep-0366`. This enhances the usefulness of the :option:`-m` option "
826
830
"when the referenced module lives in a package."
827
- msgstr ""
831
+ msgstr ":ref:`pep-0366`。 这增强了 :option:`-m` 选项在被引用的模块位于包中时的实用性。 "
828
832
829
833
#: ../../whatsnew/3.0.rst:496
830
834
msgid ":ref:`pep-0370`."
@@ -843,26 +847,33 @@ msgid ""
843
847
"API for string formatting, and to start deprecating the ``%`` operator in "
844
848
"Python 3.1."
845
849
msgstr ""
850
+ ":ref:`pep-3101`。 注意:2.6 说明文档提到 :meth:`format` 方法同时适用于 8 位和 Unicode 字符串。 在 "
851
+ "3.0 中,只有 :class:`str` 类型(带有 Unicode 支持的文本字符串)才支持此方法;:class:`bytes` 类型并不支持。 "
852
+ "最终的计划是使其成为仅针对字符串格式化的 API,并在 Python 3.1 中开始弃用 ``%`` 字符串运算符。"
846
853
847
854
#: ../../whatsnew/3.0.rst:507
848
855
msgid ""
849
856
":ref:`pep-3105`. This is now a standard feature and no longer needs to be "
850
857
"imported from :mod:`__future__`. More details were given above."
851
- msgstr ""
858
+ msgstr ":ref:`pep-3105`。 现在这已是一个标准特性而不再需要从 :mod:`__future__` 导入。 更多详情见上文。 "
852
859
853
860
#: ../../whatsnew/3.0.rst:510
854
861
msgid ""
855
862
":ref:`pep-3110`. The :keyword:`except` *exc* :keyword:`!as` *var* syntax is"
856
863
" now standard and :keyword:`!except` *exc*, *var* is no longer supported. "
857
864
"(Of course, the :keyword:`!as` *var* part is still optional.)"
858
865
msgstr ""
866
+ ":ref:`pep-3110`。 现在 :keyword:`except` *exc* :keyword:`!as` *var* 语法已成为标准而 "
867
+ ":keyword:`!except` *exc*, *var* 不再受到支持。 (当然,:keyword:`!as` *var* 部分仍为可选项。)"
859
868
860
869
#: ../../whatsnew/3.0.rst:515
861
870
msgid ""
862
871
":ref:`pep-3112`. The ``b\" ...\" `` string literal notation (and its variants"
863
872
" like ``b'...'``, ``b\"\"\" ...\"\"\" ``, and ``br\" ...\" ``) now produces a "
864
873
"literal of type :class:`bytes`."
865
874
msgstr ""
875
+ ":ref:`pep-3112`。 现在 ``b\" ...\" `` 字节串字面值标记法(及其变化形式如 ``b'...'``, "
876
+ "``b\"\"\" ...\"\"\" `` 和 ``br\" ...\" `` 等将产生 :class:`bytes` 类型的字面值。"
866
877
867
878
#: ../../whatsnew/3.0.rst:519
868
879
msgid ""
@@ -875,6 +886,11 @@ msgid ""
875
886
"beware that the text object maintains a buffer of itself in order to speed "
876
887
"up the encoding and decoding operations)."
877
888
msgstr ""
889
+ ":ref:`pep-3116`。 :mod:`io` 模块现在是执行文件 I/O 的标准方式。 内置的 :func:`open` 函数现在是 "
890
+ ":func:`io.open` 的别名并增加了额外的关键字参数 *encoding*, *errors*, *newline* 和 *closefd*。"
891
+ " 还请注意无效的 *mode* 参数现在会引发 :exc:`ValueError`,而不是 :exc:`IOError`。 "
892
+ "在文本文件对象之下的二进制文件对象可作为 :attr:`!f.buffer` "
893
+ "来访问(但要记住文本对象会为自己保留一个缓冲区以加快编码和解码操作的速度)。"
878
894
879
895
#: ../../whatsnew/3.0.rst:529
880
896
msgid ""
@@ -908,6 +924,8 @@ msgid ""
908
924
"defining Python's\" numeric tower\" . Also note the new :mod:`fractions` "
909
925
"module which implements :class:`numbers.Rational`."
910
926
msgstr ""
927
+ ":ref:`pep-3141`。 :mod:`numbers` 模块是 ABC 的另一个新用例,它定义了 Python 的“数字层级塔”。 另请注意新的"
928
+ " :mod:`fractions` 模块,它实现了 :class:`numbers.Rational`。"
911
929
912
930
#: ../../whatsnew/3.0.rst:551
913
931
msgid "Library Changes"
@@ -1533,4 +1551,4 @@ msgstr ""
1533
1551
#: ../../whatsnew/3.0.rst:929
1534
1552
msgid ""
1535
1553
"For porting C extensions to Python 3.0, please see :ref:`cporting-howto`."
1536
- msgstr ""
1554
+ msgstr "有关如何将 C 扩展移植到 Python 3.0,请参阅 :ref:`cporting-howto`。 "