@@ -15,7 +15,7 @@ msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.8\n "
1717"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2024-03-01 23:48 +0000\n "
18+ "POT-Creation-Date : 2024-05-24 17:08 +0000\n "
1919"PO-Revision-Date : 2020-05-30 12:17+0000\n "
2020"
Last-Translator :
Freesand Leo <[email protected] >, 2024\n "
2121"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -192,6 +192,9 @@ msgid ""
192192"off, but users will have had all of 2.1's lifetime to fix any breakage "
193193"resulting from their introduction."
194194msgstr ""
195+ "由于兼容性问题,嵌套作用域被逐步引入;在 Python 2.1 中,它们默认未启用,但可以通过在模块中使用 future 语句来开启,如 "
196+ ":pep:`236` 所述。 (参见下一节对 :pep:`236` 的进一步讨论。) 在 Python 2.2 "
197+ "中,嵌套作用域将成为默认设置,并且无法关闭,但用户将有整个 2.1 版本的生命周期来修复因引入嵌套作用域而导致的任何问题。"
195198
196199#: ../../whatsnew/2.1.rst:123
197200msgid ":pep:`227` - Statically Nested Scopes"
@@ -213,13 +216,15 @@ msgid ""
213216"introducing a convention for enabling optional functionality in release N "
214217"that will become compulsory in release N+1."
215218msgstr ""
219+ "对嵌套作用域的反应引起了广泛关注,人们担心在 Python 2.1 版本发布时会破坏现有代码,强烈的反应促使 Python "
220+ "开发者采取了更保守的策略。这个策略包括引入一种约定,在版本 N 中启用可选功能,该功能将在版本 N+1 中成为强制功能。"
216221
217222#: ../../whatsnew/2.1.rst:138
218223msgid ""
219224"The syntax uses a ``from...import`` statement using the reserved module name"
220225" :mod:`__future__`. Nested scopes can be enabled by the following "
221226"statement::"
222- msgstr ""
227+ msgstr "语法使用 ``from...import`` 语句,使用保留模块名 :mod:`__future__`。可以通过以下语句启用嵌套作用域:: "
223228
224229#: ../../whatsnew/2.1.rst:143
225230msgid ""
@@ -230,6 +235,9 @@ msgid ""
230235"how the Python bytecode compiler parses code and generates bytecode, so they"
231236" must precede any statement that will result in bytecodes being produced."
232237msgstr ""
238+ "虽然它看起来像一个普通的 :keyword:`import` 语句,但实际上并不是;关于此类 future "
239+ "语句的位置有严格的规定。它们只能放在模块的顶部,必须位于任何 Python 代码或常规 :keyword:`!import` "
240+ "语句之前。这是因为这样的语句会影响 Python 字节码编译器解析代码和生成字节码的方式,因此它们必须在任何会生成字节码的语句之前出现。"
233241
234242#: ../../whatsnew/2.1.rst:153
235243msgid ":pep:`236` - Back to the :mod:`__future__`"
@@ -266,6 +274,8 @@ msgid ""
266274"``>``, ``>=``, ``==``, and ``!=`` operations. The new magic method names "
267275"are:"
268276msgstr ""
277+ "在 Python 2.1 中增加了富比较操作以支持这一需求。 Python 类现在可以单独重载 ``<``, ``<=``, ``>``, "
278+ "``>=``, ``==`` 和 ``!=`` 中的每个操作。 新的魔术方法名称如下:"
269279
270280#: ../../whatsnew/2.1.rst:179
271281msgid "Operation"
@@ -329,6 +339,8 @@ msgid ""
329339"``.LT.``. ``.LE.``, &c. Numeric programmers are almost certainly quite "
330340"familiar with these names and will find them easy to remember.)"
331341msgstr ""
342+ "(这些魔术方法是以对应的 Fortran 操作符命名的,如 ``.LT.``、``.LE.`` 等。 "
343+ "数值程序员几乎肯定对这些名称非常熟悉,并且会发现它们易于记忆。)"
332344
333345#: ../../whatsnew/2.1.rst:198
334346msgid ""
@@ -337,6 +349,8 @@ msgid ""
337349"``other`` will be the object on the right-hand side. For example, the "
338350"expression ``A < B`` will cause ``A.__lt__(B)`` to be called."
339351msgstr ""
352+ "每个这样的魔术方法的形式都是 ``method(self, other)``,其中 ``self`` 是操作符左侧的对象,而 ``other`` "
353+ "是操作符右侧的对象。 例如,表达式 ``A < B`` 会调用 ``A.__lt__(B)``。"
340354
341355#: ../../whatsnew/2.1.rst:203
342356msgid ""
@@ -345,6 +359,7 @@ msgid ""
345359"exception if the comparison is impossible, inconsistent, or otherwise "
346360"meaningless."
347361msgstr ""
362+ "这些魔术方法可以返回任何类型的值:布尔值、矩阵、列表或任何其他 Python 对象。或者,如果比较是不可能的、不一致的或没有意义的,它们也可以引发异常。"
348363
349364#: ../../whatsnew/2.1.rst:207
350365msgid ""
0 commit comments