Skip to content

Commit a05e0c6

Browse files
[po] auto sync
1 parent ba68b68 commit a05e0c6

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.stat.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "93.13%", "updated_at": "2024-05-29T03:20:36Z"}
1+
{"translation": "93.15%", "updated_at": "2024-05-30T02:24:56Z"}

whatsnew/2.1.po

+25-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.9\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2024-03-01 21:26+0000\n"
18+
"POT-Creation-Date: 2024-05-24 16:33+0000\n"
1919
"PO-Revision-Date: 2017-02-16 23:42+0000\n"
2020
"Last-Translator: Freesand Leo <yuqinju@163.com>, 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."
194194
msgstr ""
195+
"由于兼容性问题,嵌套作用域被逐步引入;在 Python 2.1 中,它们默认未启用,但可以通过在模块中使用 future 语句来开启,如 "
196+
":pep:`236` 所述。 (参见下一节对 :pep:`236` 的进一步讨论。) 在 Python 2.2 "
197+
"中,嵌套作用域将成为默认设置,并且无法关闭,但用户将有整个 2.1 版本的生命周期来修复因引入嵌套作用域而导致的任何问题。"
195198

196199
#: ../../whatsnew/2.1.rst:123
197200
msgid ":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."
215218
msgstr ""
219+
"对嵌套作用域的反应引起了广泛关注,人们担心在 Python 2.1 版本发布时会破坏现有代码,强烈的反应促使 Python "
220+
"开发者采取了更保守的策略。这个策略包括引入一种约定,在版本 N 中启用可选功能,该功能将在版本 N+1 中成为强制功能。"
216221

217222
#: ../../whatsnew/2.1.rst:138
218223
msgid ""
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
225230
msgid ""
@@ -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."
232237
msgstr ""
238+
"虽然它看起来像一个普通的 :keyword:`import` 语句,但实际上并不是;关于此类 future "
239+
"语句的位置有严格的规定。它们只能放在模块的顶部,必须位于任何 Python 代码或常规 :keyword:`!import` "
240+
"语句之前。这是因为这样的语句会影响 Python 字节码编译器解析代码和生成字节码的方式,因此它们必须在任何会生成字节码的语句之前出现。"
233241

234242
#: ../../whatsnew/2.1.rst:153
235243
msgid ":pep:`236` - Back to the :mod:`__future__`"
@@ -266,6 +274,8 @@ msgid ""
266274
"``>``, ``>=``, ``==``, and ``!=`` operations. The new magic method names "
267275
"are:"
268276
msgstr ""
277+
"在 Python 2.1 中增加了富比较操作以支持这一需求。 Python 类现在可以单独重载 ``<``, ``<=``, ``>``, "
278+
"``>=``, ``==`` 和 ``!=`` 中的每个操作。 新的魔术方法名称如下:"
269279

270280
#: ../../whatsnew/2.1.rst:179
271281
msgid "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.)"
331341
msgstr ""
342+
"(这些魔术方法是以对应的 Fortran 操作符命名的,如 ``.LT.``、``.LE.`` 等。 "
343+
"数值程序员几乎肯定对这些名称非常熟悉,并且会发现它们易于记忆。)"
332344

333345
#: ../../whatsnew/2.1.rst:198
334346
msgid ""
@@ -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."
339351
msgstr ""
352+
"每个这样的魔术方法的形式都是 ``method(self, other)``,其中 ``self`` 是操作符左侧的对象,而 ``other`` "
353+
"是操作符右侧的对象。 例如,表达式 ``A < B`` 会调用 ``A.__lt__(B)``。"
340354

341355
#: ../../whatsnew/2.1.rst:203
342356
msgid ""
@@ -345,6 +359,7 @@ msgid ""
345359
"exception if the comparison is impossible, inconsistent, or otherwise "
346360
"meaningless."
347361
msgstr ""
362+
"这些魔术方法可以返回任何类型的值:布尔值、矩阵、列表或任何其他 Python 对象。或者,如果比较是不可能的、不一致的或没有意义的,它们也可以引发异常。"
348363

349364
#: ../../whatsnew/2.1.rst:207
350365
msgid ""
@@ -365,6 +380,8 @@ msgid ""
365380
":pep:`207`, or to 2.1's C API documentation, for the full list of related "
366381
"functions."
367382
msgstr ""
383+
"对于 C 程序员来说,也有相应的变更;类型对象中有一个新的槽位 ``tp_richcmp`` 以及一个用于执行指定富比较的 API。 这里我不会涉及 C"
384+
" API 的具体内容,完整的相关函数列表请参阅 :pep:`207` 或 2.1 的 C API 文档。"
368385

369386
#: ../../whatsnew/2.1.rst:223
370387
msgid ":pep:`207` - Rich Comparisons"
@@ -392,6 +409,10 @@ msgid ""
392409
" following Python version can then drop the feature, and users will have had"
393410
" a full release cycle to remove uses of the old feature."
394411
msgstr ""
412+
"在过去的 10 年中,Python 积累了一定数量的过时模块和功能。 "
413+
"由于无法确切知道某个功能被使用的程度:可能没有程序依赖该功能,也可能有很多程序依赖,因此很难确定何时可以安全地移除某个功能,为了以更结构化的方式移除旧功能,添加了一个警告框架。"
414+
" 当 Python 开发者想要废弃某个功能时,它会在下一个 Python 版本中首先触发一个警告。 "
415+
"然后,在随后的Python版本中可以移除该功能,这样用户将有一个完整的发布周期来删除对旧功能的使用。"
395416

396417
#: ../../whatsnew/2.1.rst:242
397418
msgid ""
@@ -401,6 +422,8 @@ msgid ""
401422
" can also use this framework to deprecate old features that they no longer "
402423
"wish to support."
403424
msgstr ""
425+
"Python 2.1 增加了警告框架以用于此方案。 它增加了一个 :mod:`warnings` "
426+
"模块,该模块提供了发出警告的函数,以及过滤掉不想显示的警告的功能。 第三方模块也可以使用这个框架来弃用它们不再希望支持的旧功能。"
404427

405428
#: ../../whatsnew/2.1.rst:248
406429
msgid ""

0 commit comments

Comments
 (0)