Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 377a04a

Browse files
[po] auto sync
1 parent e2356a2 commit 377a04a

2 files changed

Lines changed: 39 additions & 13 deletions

File tree

reference/compound_stmts.po

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,10 @@ msgid ""
20402040
"should be a type (again, this is not enforced at runtime). Constrained type "
20412041
"variables can only take on one of the types in the list of constraints."
20422042
msgstr ""
2043+
":data:`typing.TypeVar` 声明可以通过在冒号 (``:`` ) 后跟一个表达式来定义 *范围* 和 *约束*。 "
2044+
"冒号后的单独表达式表示一个范围 (例如 ``T: int``)。 从语义上讲,这意味着 :data:`!typing.TypeVar` "
2045+
"能表示的类型只能是该范围的子类型。 冒号后在圆括号内的表达式元组指定了一组约束 (例如 ``T: (str, bytes)``)。 "
2046+
"元组中的每个成员都应为一个类型 (同样,在运行时并不强制要求这一点)。 约束的类型变量只能使用约束列表内的类型中选择一种。 "
20432047

20442048
#: ../../reference/compound_stmts.rst:1682
20452049
msgid ""
@@ -2050,31 +2054,34 @@ msgid ""
20502054
"bounds or constraints are evaluated in a separate :ref:`annotation scope "
20512055
"<annotation-scopes>`."
20522056
msgstr ""
2057+
"对于使用类型形参列表语法声明的 :data:`!typing.TypeVar`,范围和约束在创建泛型对象时并不会被求值,只有在通过属性 "
2058+
"``__bound__`` 和 ``__constraints__`` 显式地访问它时才会被求值。 要做到这一点,需要在单独的 :ref:`标注作用域 "
2059+
"<annotation-scopes>` 中对范围和约束进行求值。"
20532060

20542061
#: ../../reference/compound_stmts.rst:1688
20552062
msgid ""
20562063
":data:`typing.TypeVarTuple`\\ s and :data:`typing.ParamSpec`\\ s cannot have"
20572064
" bounds or constraints."
2058-
msgstr ""
2065+
msgstr ":data:`typing.TypeVarTuple` 和 :data:`typing.ParamSpec` 不能拥有范围或约束。"
20592066

20602067
#: ../../reference/compound_stmts.rst:1691
20612068
msgid ""
20622069
"The following example indicates the full set of allowed type parameter "
20632070
"declarations::"
2064-
msgstr ""
2071+
msgstr "下面的例子显示了所有被允许的类型形参声明::"
20652072

20662073
#: ../../reference/compound_stmts.rst:1709
20672074
msgid "Generic functions"
2068-
msgstr ""
2075+
msgstr "泛型函数"
20692076

20702077
#: ../../reference/compound_stmts.rst:1711
20712078
msgid "Generic functions are declared as follows::"
2072-
msgstr ""
2079+
msgstr "泛型函数的声明方式如下::"
20732080

20742081
#: ../../reference/compound_stmts.rst:1715
20752082
#: ../../reference/compound_stmts.rst:1775
20762083
msgid "This syntax is equivalent to::"
2077-
msgstr ""
2084+
msgstr "该语法等价于::"
20782085

20792086
#: ../../reference/compound_stmts.rst:1724
20802087
msgid ""
@@ -2084,19 +2091,22 @@ msgid ""
20842091
"attribute access on the :mod:`typing` module, but creates an instance of "
20852092
":data:`typing.TypeVar` directly.)"
20862093
msgstr ""
2094+
"这里 ``annotation-def`` 指定了一个 :ref:`标注作用域 <annotation-"
2095+
"scopes>`,它在运行时并不会实际绑定到任何名称。 (另一项自由是在翻译中达成的:该语法没有通过 :mod:`typing` "
2096+
"模块的属性访问,而是直接创建了一个 :data:`typing.TypeVar` 的实例)。"
20872097

20882098
#: ../../reference/compound_stmts.rst:1730
20892099
msgid ""
20902100
"The annotations of generic functions are evaluated within the annotation "
20912101
"scope used for declaring the type parameters, but the function's defaults "
20922102
"and decorators are not."
2093-
msgstr ""
2103+
msgstr "泛型函数的标注会在用于声明类型形参的标注作用域内进行求值,但函数的默认值和装饰器则不会。"
20942104

20952105
#: ../../reference/compound_stmts.rst:1734
20962106
msgid ""
20972107
"The following example illustrates the scoping rules for these cases, as well"
20982108
" as for additional flavors of type parameters::"
2099-
msgstr ""
2109+
msgstr "下面的例子演示了针对这些场景,以及类型形参的变化形式的作用域规则::"
21002110

21012111
#: ../../reference/compound_stmts.rst:1741
21022112
msgid ""

whatsnew/3.12.po

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# Nyuan Zhang, 2023
1818
# Dai Xu <[email protected]>, 2023
1919
# 汇民 王 <[email protected]>, 2023
20-
# Freesand Leo <[email protected]>, 2023
2120
# Alpha Du <[email protected]>, 2023
21+
# Freesand Leo <[email protected]>, 2023
2222
#
2323
#, fuzzy
2424
msgid ""
@@ -27,7 +27,7 @@ msgstr ""
2727
"Report-Msgid-Bugs-To: \n"
2828
"POT-Creation-Date: 2023-07-29 02:08+0000\n"
2929
"PO-Revision-Date: 2023-05-24 13:08+0000\n"
30-
"Last-Translator: Alpha Du <alphanow@gmail.com>, 2023\n"
30+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2023\n"
3131
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
3232
"MIME-Version: 1.0\n"
3333
"Content-Type: text/plain; charset=UTF-8\n"
@@ -2760,6 +2760,9 @@ msgid ""
27602760
"strings can now only contain ASCII letters and digits and underscore. "
27612761
"(Contributed by Serhiy Storchaka in :gh:`91760`.)"
27622762
msgstr ""
2763+
"现在对于正则表达式中的数字分组引用和分组名称将应用更严格的规则。 现在只接受 ASCII 数字序列作为数字引用。 "
2764+
"字节串模式和替换字符串中的分组名称现在只能包含 ASCII 字母、数字和下划线。 (由 Serhiy Storchaka 在 :gh:`91760` "
2765+
"中贡献。)"
27632766

27642767
#: ../../whatsnew/3.12.rst:1458
27652768
msgid ""
@@ -2772,6 +2775,11 @@ msgid ""
27722775
"``randrange(10**25)``. (Originally suggested by Serhiy Storchaka "
27732776
":gh:`86388`.)"
27742777
msgstr ""
2778+
"移除了自 Python 3.10 起已被弃用的 ``randrange()`` 功能。 以前,``randrange(10.0)`` 会无损地转换为 "
2779+
"``randrange(10)``。 现在,它将引发 :exc:`TypeError`。 此外,对于非整数值如 ``randrange(10.5)`` "
2780+
"或 ``randrange('10')`` 所引发的异常已从 :exc:`ValueError` 改为 :exc:`TypeError`。 这也防止了 "
2781+
"``randrange(1e25)`` 会从比 ``randrange(10**25)`` 更大的范围中静默选择的问题。 (最初由 Serhiy "
2782+
"Storchaka 在 :gh:`86388` 中提议。)"
27752783

27762784
#: ../../whatsnew/3.12.rst:1466
27772785
msgid ""
@@ -2782,20 +2790,28 @@ msgid ""
27822790
"handler`. Argument files should be encoded in UTF-8 instead of ANSI Codepage"
27832791
" on Windows."
27842792
msgstr ""
2793+
":class:`argparse.ArgumentParser` 将从文件(例如 ``fromfile_prefix_chars`` "
2794+
"选项)读取参数的编码格式和错误处理句柄从默认的文本编码格式(例如 :func:`locale.getpreferredencoding(False) "
2795+
"<locale.getpreferredencoding>` 调用)改为 :term:`filesystem encoding and error "
2796+
"handler`。 在 Windows 系统中参数文件应使用 UTF-8 而不是 ANSI 代码页来编码。"
27852797

27862798
#: ../../whatsnew/3.12.rst:1472
27872799
msgid ""
27882800
"Removed the ``asyncore``-based ``smtpd`` module deprecated in Python 3.4.7 "
27892801
"and 3.5.4. A recommended replacement is the :mod:`asyncio`-based aiosmtpd_ "
27902802
"PyPI module."
27912803
msgstr ""
2804+
"删除了在 Python 3.4.7 和 3.5.4 中已被弃用的 ``asyncore``-based ``smtpd`` 模块。 推荐使用基于 "
2805+
":mod:`asyncio` 的 aiosmtpd_ PyPI 模块来替代。"
27922806

27932807
#: ../../whatsnew/3.12.rst:1476
27942808
msgid ""
27952809
":func:`shlex.split`: Passing ``None`` for *s* argument now raises an "
27962810
"exception, rather than reading :data:`sys.stdin`. The feature was deprecated"
27972811
" in Python 3.9. (Contributed by Victor Stinner in :gh:`94352`.)"
27982812
msgstr ""
2813+
":func:`shlex.split`: 传入 ``None`` 作为 *s* 参数现在将引发异常,而不是读取 :data:`sys.stdin`。 "
2814+
"该特性在 Python 3.9 中已被弃用。 (由 Victor Stinner 在 :gh:`94352` 中贡献。)"
27992815

28002816
#: ../../whatsnew/3.12.rst:1481
28012817
msgid ""
@@ -2932,19 +2948,19 @@ msgstr ""
29322948

29332949
#: ../../whatsnew/3.12.rst:1578
29342950
msgid "loongarch64-linux-gnuf32"
2935-
msgstr ""
2951+
msgstr "loongarch64-linux-gnuf32"
29362952

29372953
#: ../../whatsnew/3.12.rst:1579
29382954
msgid "loongarch64-linux-gnu"
2939-
msgstr ""
2955+
msgstr "loongarch64-linux-gnu"
29402956

29412957
#: ../../whatsnew/3.12.rst:1581
29422958
msgid "(Contributed by Zhang Na in :gh:`90656`.)"
2943-
msgstr ""
2959+
msgstr "(由 Zhang Na 在 :gh:`90656` 中贡献。).)"
29442960

29452961
#: ../../whatsnew/3.12.rst:1583
29462962
msgid "``PYTHON_FOR_REGEN`` now require Python 3.10 or newer."
2947-
msgstr ""
2963+
msgstr "``PYTHON_FOR_REGEN`` 现在需要 Python 3.10 或更新版本。"
29482964

29492965
#: ../../whatsnew/3.12.rst:1585
29502966
msgid ""

0 commit comments

Comments
 (0)