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

Skip to content

Commit 9e17d8f

Browse files
[po] auto sync
1 parent 2e6791b commit 9e17d8f

1 file changed

Lines changed: 70 additions & 5 deletions

File tree

whatsnew/3.10.po

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ msgstr ""
27822782

27832783
#: ../../whatsnew/3.10.rst:1761 ../../whatsnew/3.10.rst:2040
27842784
msgid "Porting to Python 3.10"
2785-
msgstr ""
2785+
msgstr "移植到 Python 3.10"
27862786

27872787
#: ../../whatsnew/3.10.rst:1763
27882788
msgid ""
@@ -2792,7 +2792,7 @@ msgstr "本节列出了先前描述的更改以及可能需要更改代码的其
27922792

27932793
#: ../../whatsnew/3.10.rst:1768
27942794
msgid "Changes in the Python syntax"
2795-
msgstr ""
2795+
msgstr "Python 语法中的变化"
27962796

27972797
#: ../../whatsnew/3.10.rst:1770
27982798
msgid ""
@@ -3179,6 +3179,8 @@ msgid ""
31793179
"immutable type objects: type attributes cannot be set nor deleted. "
31803180
"(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)"
31813181
msgstr ""
3182+
"增加了新的 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 类型旗标用于创建不可变类型对象:类型属性不可被设置或删除。 (由 "
3183+
"Victor Stinner 和 Erlend E. Aasland 在 :issue:`43908` 中贡献。)"
31823184

31833185
#: ../../whatsnew/3.10.rst:2042
31843186
msgid ""
@@ -3188,6 +3190,10 @@ msgid ""
31883190
"See :ref:`Parsing arguments and building values <arg-parsing>` and the "
31893191
":pep:`353`. (Contributed by Victor Stinner in :issue:`40943`.)"
31903192
msgstr ""
3193+
"现在必须定义 ``PY_SSIZE_T_CLEAN`` 才能使用 :c:func:`PyArg_ParseTuple` 和 "
3194+
":c:func:`Py_BuildValue`,该格式会使用 ``#``: ``es#``, ``et#``, ``s#``, ``u#``, "
3195+
"``y#``, ``z#``, ``U#`` 和 ``Z#``。 参见 :ref:`解析参数和构造值 <arg-parsing>` 以及 "
3196+
":pep:`353`。 (由 Victor Stinner 在 :issue:`40943` 中贡献。)"
31913197

31923198
#: ../../whatsnew/3.10.rst:2049
31933199
msgid ""
@@ -3196,17 +3202,22 @@ msgid ""
31963202
"new_refcnt)``: see :c:func:`Py_SET_REFCNT()` (available since Python 3.9). "
31973203
"For backward compatibility, this macro can be used::"
31983204
msgstr ""
3205+
"由于 :c:func:`Py_REFCNT()` 已被改为内联静态函数,``Py_REFCNT(obj) = new_refcnt`` 必须被替换为 "
3206+
"``Py_SET_REFCNT(obj, new_refcnt)``: 参见 :c:func:`Py_SET_REFCNT()` (自 Python "
3207+
"3.9 起可用)。 为保持向下兼容性,可使用这个宏::"
31993208

32003209
#: ../../whatsnew/3.10.rst:2058
32013210
msgid "(Contributed by Victor Stinner in :issue:`39573`.)"
3202-
msgstr ""
3211+
msgstr "(由 Victor Stinner 在 :issue:`39573` 中贡献。)"
32033212

32043213
#: ../../whatsnew/3.10.rst:2060
32053214
msgid ""
32063215
"Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed "
32073216
"for historical reason. It is no longer allowed. (Contributed by Victor "
32083217
"Stinner in :issue:`40839`.)"
32093218
msgstr ""
3219+
"不带 :term:`GIL` 地调用 :c:func:`PyDict_GetItem` 曾出于历史原因被允许。 现在已不再被允许。 (由 Victor "
3220+
"Stinner 在 :issue:`40839` 中贡献。)"
32103221

32113222
#: ../../whatsnew/3.10.rst:2064
32123223
msgid ""
@@ -3215,13 +3226,19 @@ msgid ""
32153226
"now. Use :c:func:`PyUnicode_New` to allocate Unicode object without initial"
32163227
" data. (Contributed by Inada Naoki in :issue:`36346`.)"
32173228
msgstr ""
3229+
"``PyUnicode_FromUnicode(NULL, size)`` 和 ``PyUnicode_FromStringAndSize(NULL, "
3230+
"size)`` 现在会引发 ``DeprecationWarning``。 请使用 :c:func:`PyUnicode_New` 来分配不带初始数据的"
3231+
" Unicode 对象。 (由 Inada Naoki 在 :issue:`36346` 中贡献。)"
32183232

32193233
#: ../../whatsnew/3.10.rst:2069
32203234
msgid ""
32213235
"The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API "
32223236
"``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. "
32233237
"(Contributed by Victor Stinner in :issue:`42157`.)"
32243238
msgstr ""
3239+
"私有的 ``_PyUnicode_Name_CAPI`` 结构体 (PyCapsule API "
3240+
"``unicodedata.ucnhash_CAPI``) 已被移到内部 C API。 (由 Victor Stinner 在 "
3241+
":issue:`42157` 中贡献。)"
32253242

32263243
#: ../../whatsnew/3.10.rst:2073
32273244
msgid ""
@@ -3233,6 +3250,12 @@ msgid ""
32333250
":ref:`Python Path Configuration. <init-path-config>`. (Contributed by "
32343251
"Victor Stinner in :issue:`42260`.)"
32353252
msgstr ""
3253+
"现在 :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`,"
3254+
" :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` 和 "
3255+
":c:func:`Py_GetProgramName` 当在 :c:func:`Py_Initialize` 之前被调用(在 Python "
3256+
"被初始化之前)时将返回 ``NULL``。 请使用新的 :ref:`Python 初始化配置 API <init-config>` 来获取 "
3257+
":ref:`Python 路径配置。 <init-path-config>`。 (由 Victor Stinner 在 :issue:`42260` "
3258+
"中贡献。)"
32363259

32373260
#: ../../whatsnew/3.10.rst:2081
32383261
msgid ""
@@ -3243,6 +3266,11 @@ msgid ""
32433266
"(PyList_SET_ITEM (a, b, c) < 0) ...`` test. (Contributed by Zackery Spytz "
32443267
"and Victor Stinner in :issue:`30459`.)"
32453268
msgstr ""
3269+
":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` 和 :c:func:`PyCell_SET`"
3270+
" 宏不可再被用作 l 值或 r 值。 例如,``x = PyList_SET_ITEM(a, b, c)`` 和 "
3271+
"``PyList_SET_ITEM(a, b, c) = x`` 现在会失败并提示编译器错误。 它可以防止 ``if (PyList_SET_ITEM "
3272+
"(a, b, c) < 0) ...`` 检测之类的问题。 (由 Zackery Spytz 和 Victor Stinner 在 "
3273+
":issue:`30459` 中贡献。)"
32463274

32473275
#: ../../whatsnew/3.10.rst:2088
32483276
msgid ""
@@ -3254,6 +3282,11 @@ msgid ""
32543282
"been included directly, consider including ``Python.h`` instead. "
32553283
"(Contributed by Nicholas Sim in :issue:`35134`)"
32563284
msgstr ""
3285+
"非受限 API 文件 ``odictobject.h``, ``parser_interface.h``, ``picklebufobject.h``,"
3286+
" ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe.h``, 和 ``pytime.h`` "
3287+
"已被移至 ``Include/cpython`` 目录。 这些文件不可被直接包括,因为它们已经在``Python.h`` 中被包括了: "
3288+
":ref:`Include 文件 <api-includes>`。 如果它们已被直接包括,请考虑改为包括 ``Python.h``。 (由 "
3289+
"Nicholas Sim 在 :issue:`35134` 中贡献。)"
32573290

32583291
#: ../../whatsnew/3.10.rst:2096
32593292
msgid ""
@@ -3263,85 +3296,111 @@ msgid ""
32633296
"is set instead. (Contributed by Victor Stinner and Erlend E. Aasland in "
32643297
":issue:`43908`.)"
32653298
msgstr ""
3299+
"请使用 :c:data:`Py_TPFLAGS_IMMUTABLETYPE` 类型旗标来创建不可变对象。 不要依赖 "
3300+
":c:data:`Py_TPFLAGS_HEAPTYPE` 来确定类型对象是否可变;请改为检查是否设置了 "
3301+
":c:data:`Py_TPFLAGS_IMMUTABLETYPE`。 (由 Victor Stinner 和 Erlend E. Aasland 在 "
3302+
":issue:`43908` 中贡献。)"
32663303

32673304
#: ../../whatsnew/3.10.rst:2102
32683305
msgid ""
32693306
"The undocumented function ``Py_FrozenMain`` has been removed from the "
32703307
"limited API. The function is mainly useful for custom builds of Python. "
32713308
"(Contributed by Petr Viktorin in :issue:`26241`)"
32723309
msgstr ""
3310+
"未记入文档的函数 ``Py_FrozenMain`` 已从受限 API 中被移除。 此函数主要适用于 Python 的定制编译版。 (由 Petr "
3311+
"Viktorin 在 :issue:`26241` 中贡献)"
32733312

32743313
#: ../../whatsnew/3.10.rst:2109
32753314
msgid ""
32763315
"The ``PyUnicode_InternImmortal()`` function is now deprecated and will be "
32773316
"removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. "
32783317
"(Contributed by Victor Stinner in :issue:`41692`.)"
32793318
msgstr ""
3319+
"现在 ``PyUnicode_InternImmortal()`` 函数已被弃用并将在 Python 3.12 中移除:请改用 "
3320+
":c:func:`PyUnicode_InternInPlace`。 (由 Victor Stinner 在 :issue:`41692` 中贡献。)"
32803321

32813322
#: ../../whatsnew/3.10.rst:2117
32823323
msgid ""
32833324
"Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. "
32843325
"(Contributed by Inada Naoki in :issue:`41123`.)"
32853326
msgstr ""
3327+
"移除了 ``Py_UNICODE_str*`` 函数,它被用于控制 ``Py_UNICODE*`` 字符串。 (由 Inada Naoki 在 "
3328+
":issue:`41123` 中贡献。)"
32863329

32873330
#: ../../whatsnew/3.10.rst:2120
32883331
msgid ""
32893332
"``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or "
32903333
":c:macro:`PyUnicode_GET_LENGTH`"
32913334
msgstr ""
3335+
"``Py_UNICODE_strlen``: 使用 :c:func:`PyUnicode_GetLength` 或 "
3336+
":c:macro:`PyUnicode_GET_LENGTH`"
32923337

32933338
#: ../../whatsnew/3.10.rst:2122
32943339
msgid ""
32953340
"``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or "
32963341
":c:func:`PyUnicode_FromFormat`"
32973342
msgstr ""
3343+
"``Py_UNICODE_strcat``: 使用 :c:func:`PyUnicode_CopyCharacters` 或 "
3344+
":c:func:`PyUnicode_FromFormat`"
32983345

32993346
#: ../../whatsnew/3.10.rst:2124
33003347
msgid ""
33013348
"``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use "
33023349
":c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`"
33033350
msgstr ""
3351+
"``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: 使用 "
3352+
":c:func:`PyUnicode_CopyCharacters` 或 :c:func:`PyUnicode_Substring`"
33043353

33053354
#: ../../whatsnew/3.10.rst:2126
33063355
msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`"
3307-
msgstr ""
3356+
msgstr "``Py_UNICODE_strcmp``: 使用 :c:func:`PyUnicode_Compare`"
33083357

33093358
#: ../../whatsnew/3.10.rst:2127
33103359
msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`"
3311-
msgstr ""
3360+
msgstr "``Py_UNICODE_strncmp``: 使用 :c:func:`PyUnicode_Tailmatch`"
33123361

33133362
#: ../../whatsnew/3.10.rst:2128
33143363
msgid ""
33153364
"``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use "
33163365
":c:func:`PyUnicode_FindChar`"
33173366
msgstr ""
3367+
"``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: 使用 "
3368+
":c:func:`PyUnicode_FindChar`"
33183369

33193370
#: ../../whatsnew/3.10.rst:2131
33203371
msgid ""
33213372
"Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. "
33223373
"(Contributed by Inada Naoki in :issue:`41103`.)"
33233374
msgstr ""
3375+
"移除了 ``PyUnicode_GetMax()``。 请迁移到新的 (:pep:`393`) API。 (由 Inada Naoki 在 "
3376+
":issue:`41103` 中贡献。)"
33243377

33253378
#: ../../whatsnew/3.10.rst:2134
33263379
msgid ""
33273380
"Removed ``PyLong_FromUnicode()``. Please migrate to "
33283381
":c:func:`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in "
33293382
":issue:`41103`.)"
33303383
msgstr ""
3384+
"移除了 ``PyLong_FromUnicode()``。 请迁移到 :c:func:`PyLong_FromUnicodeObject`。 (由 "
3385+
"Inada Naoki 在 :issue:`41103` 中贡献。)"
33313386

33323387
#: ../../whatsnew/3.10.rst:2137
33333388
msgid ""
33343389
"Removed ``PyUnicode_AsUnicodeCopy()``. Please use "
33353390
":c:func:`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` "
33363391
"(Contributed by Inada Naoki in :issue:`41103`.)"
33373392
msgstr ""
3393+
"移除了 ``PyUnicode_AsUnicodeCopy()``。 请使用 :c:func:`PyUnicode_AsUCS4Copy` 或 "
3394+
":c:func:`PyUnicode_AsWideCharString` (由 Inada Naoki 在 :issue:`41103` 中贡献。)"
33383395

33393396
#: ../../whatsnew/3.10.rst:2141
33403397
msgid ""
33413398
"Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by "
33423399
"``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. "
33433400
"(Contributed by Victor Stinner in :issue:`41834`.)"
33443401
msgstr ""
3402+
"移除了 ``_Py_CheckRecursionLimit`` 变量:它已被 :c:type:`PyInterpreterState` 结构体的 "
3403+
"``ceval.recursion_limit`` 所取代。 (由 Victor Stinner 在 :issue:`41834` 中贡献。)"
33453404

33463405
#: ../../whatsnew/3.10.rst:2145
33473406
msgid ""
@@ -3350,6 +3409,9 @@ msgid ""
33503409
":c:type:`PyInterpreterState` structure. (Contributed by Serhiy Storchaka in "
33513410
":issue:`41936`.)"
33523411
msgstr ""
3412+
"移除了未记入文档的宏 ``Py_ALLOW_RECURSION`` 和 ``Py_END_ALLOW_RECURSION`` 以及 "
3413+
":c:type:`PyInterpreterState` 结构体的 ``recursion_critical`` 字段。 (由 Serhiy "
3414+
"Storchaka 在 :issue:`41936` 中贡献。)"
33533415

33543416
#: ../../whatsnew/3.10.rst:2150
33553417
msgid ""
@@ -3358,6 +3420,9 @@ msgid ""
33583420
":c:member:`PyConfig.install_signal_handlers`. (Contributed by Victor Stinner"
33593421
" in :issue:`41713`.)"
33603422
msgstr ""
3423+
"移除了未记入文档的 ``PyOS_InitInterrupts()`` 函数。 初始化 Python 已经会隐式地安装信号处理句柄:参见 "
3424+
":c:member:`PyConfig.install_signal_handlers`。 (由 Victor Stinner 在 "
3425+
":issue:`41713` 中贡献。)"
33613426

33623427
#: ../../whatsnew/3.10.rst:2155
33633428
msgid ""

0 commit comments

Comments
 (0)