Skip to content

Commit 8b3da7a

Browse files
[po] auto sync
1 parent 8de2312 commit 8b3da7a

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "95.05%", "updated_at": "2024-05-29T03:47:04Z"}
1+
{"translation": "95.07%", "updated_at": "2024-05-29T16:46:51Z"}

whatsnew/2.1.po

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# Translators:
77
# Rafael Fontenelle <rffontenelle@gmail.com>, 2024
8-
# Unknownuserfrommars, 2024
98
# Freesand Leo <yuqinju@163.com>, 2024
9+
# Unknownuserfrommars, 2024
1010
#
1111
#, fuzzy
1212
msgid ""
@@ -15,7 +15,7 @@ msgstr ""
1515
"Report-Msgid-Bugs-To: \n"
1616
"POT-Creation-Date: 2024-05-24 14:49+0000\n"
1717
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
18-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
18+
"Last-Translator: Unknownuserfrommars, 2024\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2020
"MIME-Version: 1.0\n"
2121
"Content-Type: text/plain; charset=UTF-8\n"
@@ -222,7 +222,7 @@ msgid ""
222222
"The syntax uses a ``from...import`` statement using the reserved module name"
223223
" :mod:`__future__`. Nested scopes can be enabled by the following "
224224
"statement::"
225-
msgstr ""
225+
msgstr "语法使用 ``from...import`` 语句,使用保留模块名 :mod:`__future__`。可以通过以下语句启用嵌套作用域:"
226226

227227
#: ../../whatsnew/2.1.rst:143
228228
msgid ""
@@ -233,6 +233,9 @@ msgid ""
233233
"how the Python bytecode compiler parses code and generates bytecode, so they"
234234
" must precede any statement that will result in bytecodes being produced."
235235
msgstr ""
236+
"虽然它看起来像一个普通的 :keyword:`import` 语句,但实际上并不是;关于此类 future "
237+
"语句的位置有严格的规定。它们只能放在模块的顶部,必须位于任何 Python 代码或常规 :keyword:`!import` "
238+
"语句之前。这是因为这样的语句会影响 Python 字节码编译器解析代码和生成字节码的方式,因此它们必须在任何会生成字节码的语句之前出现。"
236239

237240
#: ../../whatsnew/2.1.rst:153
238241
msgid ":pep:`236` - Back to the :mod:`__future__`"
@@ -261,6 +264,10 @@ msgid ""
261264
"sizes, then the compare has to be able to raise an exception to signal the "
262265
"error."
263266
msgstr ""
267+
"在早期版本中,Python 对用户定义类和扩展类型的比较操作支持相当简单。类可以实现一个 :meth:`!__cmp__` "
268+
"方法,该方法接收两个类实例,并且只能返回 0 表示相等,或 +1 或 -1 表示不相等;该方法不能引发异常或返回布尔值以外的任何内容。Numeric "
269+
"Python 的用户经常发现这种模型太弱且受限,因为在 Numeric Python "
270+
"所用的数字运算程序中,能够对两个矩阵进行逐元素比较更为有用,返回一个包含每个元素比较结果的矩阵。如果两个矩阵的大小不同,则比较必须能够引发异常以表示错误。"
264271

265272
#: ../../whatsnew/2.1.rst:174
266273
msgid ""
@@ -269,6 +276,8 @@ msgid ""
269276
"``>``, ``>=``, ``==``, and ``!=`` operations. The new magic method names "
270277
"are:"
271278
msgstr ""
279+
"在 Python 2.1 中,为了支持这一需求,添加了丰富的比较操作。Python 类现在可以单独重载每一个 "
280+
"``<``,``<=``,``>``,``>=``,``==`` 和 ``!=`` 操作。新的魔术方法名称如下:"
272281

273282
#: ../../whatsnew/2.1.rst:179
274283
msgid "Operation"
@@ -332,6 +341,8 @@ msgid ""
332341
"``.LT.``. ``.LE.``, &c. Numeric programmers are almost certainly quite "
333342
"familiar with these names and will find them easy to remember.)"
334343
msgstr ""
344+
"(这些魔术方法是以对应的 Fortran 操作符命名的,如 ``.LT.``、``.LE.`` "
345+
"等。数值程序员几乎肯定对这些名称非常熟悉,并且会发现它们易于记忆。)"
335346

336347
#: ../../whatsnew/2.1.rst:198
337348
msgid ""
@@ -340,6 +351,8 @@ msgid ""
340351
"``other`` will be the object on the right-hand side. For example, the "
341352
"expression ``A < B`` will cause ``A.__lt__(B)`` to be called."
342353
msgstr ""
354+
"每个这样的魔术方法的形式都是 ``method(self, other)``,其中 ``self`` 是操作符左侧的对象,而 ``other`` "
355+
"是操作符右侧的对象。例如,表达式 ``A < B`` 会调用 ``A.__lt__(B)``。"
343356

344357
#: ../../whatsnew/2.1.rst:203
345358
msgid ""
@@ -360,6 +373,10 @@ msgid ""
360373
"previous versions of Python; otherwise it will call the appropriate method "
361374
"and can return any Python object."
362375
msgstr ""
376+
"内置的 ``cmp(A,B)`` 函数可以使用丰富的比较机制,现在接受一个可选参数来指定要使用的比较操作;该参数可以是字符串 "
377+
"``\"<\"``、``\"<=\"``、``\">\"``、``\">=\"``、``\"==\"`` 或 ``\"!=\"`` "
378+
"之一。如果不带可选的第三个参数调用,:func:`!cmp` 函数将只返回 -1、0 或 +1,就像以前的 Python "
379+
"版本一样;否则,它将调用适当的方法并可以返回任何 Python 对象。"
363380

364381
#: ../../whatsnew/2.1.rst:214
365382
msgid ""
@@ -369,6 +386,8 @@ msgid ""
369386
":pep:`207`, or to 2.1's C API documentation, for the full list of related "
370387
"functions."
371388
msgstr ""
389+
"对于 C 程序员来说,也有相应的变更;类型对象中有一个新的槽 ``tp_richcmp`` 以及一个用于执行指定丰富比较的 API。这里我不会涉及 C "
390+
"API 的具体内容,完整的相关函数列表请参阅 :pep:`207` 或 2.1 的 C API 文档。"
372391

373392
#: ../../whatsnew/2.1.rst:222
374393
msgid ":pep:`207` - Rich Comparisons"
@@ -406,12 +425,14 @@ msgid ""
406425
" can also use this framework to deprecate old features that they no longer "
407426
"wish to support."
408427
msgstr ""
428+
"Python 2.1 增加了警告框架以用于此方案。它增加了一个 :mod:`warnings` "
429+
"模块,该模块提供了发出警告的函数,以及过滤掉不想显示的警告的功能。第三方模块也可以使用这个框架来弃用它们不再希望支持的旧功能。"
409430

410431
#: ../../whatsnew/2.1.rst:248
411432
msgid ""
412433
"For example, in Python 2.1 the :mod:`!regex` module is deprecated, so "
413434
"importing it causes a warning to be printed::"
414-
msgstr ""
435+
msgstr "例如,在 Python 2.1 中,:mod:`!regex` 模块已被弃用,因此导入它会打印出一个警告:"
415436

416437
#: ../../whatsnew/2.1.rst:256
417438
msgid "Warnings can be issued by calling the :func:`warnings.warn` function::"

0 commit comments

Comments
 (0)