1717# Nyuan Zhang, 2023
1818# Dai Xu <[email protected] >, 2023191920- # Alpha Du <[email protected] >, 20232120# Freesand Leo <[email protected] >, 202321+ # Alpha Du <[email protected] >, 20232222#
2323#, fuzzy
2424msgid ""
@@ -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 : Freesand Leo <yuqinju@163 .com>, 2023\n "
30+ "Last-Translator : Alpha Du <alphanow@gmail .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 "
@@ -3229,20 +3229,26 @@ msgid ""
32293229" callbacks to receive notification on changes to a type. (Contributed by "
32303230"Carl Meyer in :gh:`91051`.)"
32313231msgstr ""
3232+ "添加了 :c:func:`PyType_AddWatcher` 和 :c:func:`PyType_Watch` API "
3233+ "用于注册回调以接收类型变更通知。 (由 Carl Meyer 在 :gh:`91051` 中贡献。)"
32323234
32333235#: ../../whatsnew/3.12.rst:1693
32343236msgid ""
32353237"Added :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to "
32363238"register callbacks to receive notification on creation and destruction of "
32373239"code objects. (Contributed by Itamar Ostricher in :gh:`91054`.)"
32383240msgstr ""
3241+ "添加了 :c:func:`PyCode_AddWatcher` 和 :c:func:`PyCode_ClearWatcher` API "
3242+ "用于注册回调以接收代码对象创建和销毁时的通知。 (由 Itamar Ostricher 在 :gh:`91054` 中贡献。)"
32393243
32403244#: ../../whatsnew/3.12.rst:1698
32413245msgid ""
32423246"Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to"
32433247" get a frame variable by its name. (Contributed by Victor Stinner in "
32443248":gh:`91248`.)"
32453249msgstr ""
3250+ "添加了 :c:func:`PyFrame_GetVar` 和 :c:func:`PyFrame_GetVarString` "
3251+ "函数用于通过名称来获取帧变量。 (由 Victor Stinner 在 :gh:`91248` 中贡献。)"
32463252
32473253#: ../../whatsnew/3.12.rst:1702
32483254msgid ""
@@ -3253,13 +3259,19 @@ msgid ""
32533259" and :c:func:`PyErr_Restore`. This is less error prone and a bit more "
32543260"efficient. (Contributed by Mark Shannon in :gh:`101578`.)"
32553261msgstr ""
3262+ "添加 :c:func:`PyErr_GetRaisedException` 和 :c:func:`PyErr_SetRaisedException` "
3263+ "用于保存和恢复当前异常。 这些函数返回并接受单个异常对象,而不是像现在已弃用的 :c:func:`PyErr_Fetch` 和 "
3264+ ":c:func:`PyErr_Restore` 那样的三个参数。 这样不容易出错并且更为高效。 (由 Mark Shannon 在 "
3265+ ":gh:`101578` 中贡献。)"
32563266
32573267#: ../../whatsnew/3.12.rst:1710
32583268msgid ""
32593269"Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to "
32603270"replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. "
32613271"(Contributed by Mark Shannon in :gh:`101578`.)"
32623272msgstr ""
3273+ "添加了 ``_PyErr_ChainExceptions1``,它接受一个异常实例,用于取代旧式 API "
3274+ "``_PyErr_ChainExceptions``,后者现已被弃用。 (由 Mark Shannon 在 :gh:`101578` 中贡献。)"
32633275
32643276#: ../../whatsnew/3.12.rst:1714
32653277msgid ""
@@ -3268,72 +3280,77 @@ msgid ""
32683280":attr:`~BaseException.args` passed to the exception's constructor. "
32693281"(Contributed by Mark Shannon in :gh:`101578`.)"
32703282msgstr ""
3283+ "添加了 :c:func:`PyException_GetArgs` 和 :c:func:`PyException_SetArgs` "
3284+ "作为便捷函数用于检索和修改传递给异常的构造函数的 :attr:`~BaseException.args`。 (由 Mark Shannon 在 "
3285+ ":gh:`101578` 中贡献。)"
32713286
32723287#: ../../whatsnew/3.12.rst:1719
32733288msgid ""
32743289"Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to "
32753290"replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit "
32763291"Katriel in :gh:`102755`)."
32773292msgstr ""
3293+ "添加了 :c:func:`PyErr_DisplayException`,它接受一个异常实例,用于取代旧式 API "
3294+ ":c:func:`!PyErr_Display`。 (由 Irit Katriel 在 :gh:`102755` 中贡献。)"
32783295
32793296#: ../../whatsnew/3.12.rst:1723
32803297msgid ""
32813298":pep:`683`: Introduced Immortal Objects to Python which allows objects to "
32823299"bypass reference counts and introduced changes to the C-API:"
3283- msgstr ""
3300+ msgstr ":pep:`683`: 在 Python 中引入了永生对象,它允许对象绕过引用计数,并对 C-API 进行了相应修改: "
32843301
32853302#: ../../whatsnew/3.12.rst:1726
32863303msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object"
3287- msgstr ""
3304+ msgstr "``_Py_IMMORTAL_REFCNT``: 定义对象的引用计数 "
32883305
32893306#: ../../whatsnew/3.12.rst:1727
32903307msgid "as immortal."
3291- msgstr ""
3308+ msgstr "为永生对象。 "
32923309
32933310#: ../../whatsnew/3.12.rst:1728
32943311msgid ""
32953312"``_Py_IsImmortal`` Checks if an object has the immortal reference count."
3296- msgstr ""
3313+ msgstr "``_Py_IsImmortal`` 检测一个对象是否具有永生引用计数。 "
32973314
32983315#: ../../whatsnew/3.12.rst:1729
32993316msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to"
3300- msgstr ""
3317+ msgstr "``PyObject_HEAD_INIT`` 这将把引用计数初始化为 "
33013318
33023319#: ../../whatsnew/3.12.rst:1730
33033320msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``."
3304- msgstr ""
3321+ msgstr "``_Py_IMMORTAL_REFCNT`` 当配合 ``Py_BUILD_CORE`` 使用时。 "
33053322
33063323#: ../../whatsnew/3.12.rst:1731
33073324msgid ""
33083325"``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects"
3309- msgstr ""
3326+ msgstr "``SSTATE_INTERNED_IMMORTAL`` 一个针对内部 unicode 对象的标识符 "
33103327
33113328#: ../../whatsnew/3.12.rst:1732
33123329msgid "that are immortal."
3313- msgstr ""
3330+ msgstr "为永生对象。 "
33143331
33153332#: ../../whatsnew/3.12.rst:1733
33163333msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode"
3317- msgstr ""
3334+ msgstr "``SSTATE_INTERNED_IMMORTAL_STATIC`` 一个针对内部 unicode "
33183335
33193336#: ../../whatsnew/3.12.rst:1734
33203337msgid "objects that are immortal and static"
3321- msgstr ""
3338+ msgstr "为永生且静态的对象 "
33223339
33233340#: ../../whatsnew/3.12.rst:1737
33243341msgid ""
33253342"``sys.getunicodeinternedsize`` This returns the total number of unicode"
3326- msgstr ""
3343+ msgstr "``sys.getunicodeinternedsize`` 这将返回总计的 unicode "
33273344
33283345#: ../../whatsnew/3.12.rst:1736
33293346msgid ""
33303347"objects that have been interned. This is now needed for refleak.py to "
33313348"correctly track reference counts and allocated blocks"
3332- msgstr ""
3349+ msgstr "被管理的对象。 现在 refleak.py 需要这样才能正确地追踪引用计数和分配的块 "
33333350
33343351#: ../../whatsnew/3.12.rst:1739
33353352msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)"
3336- msgstr ""
3353+ msgstr "(由 Eddie Elizondo 在 :gh:`84436` 中贡献。) "
33373354
33383355#: ../../whatsnew/3.12.rst:1741
33393356msgid ""
@@ -3342,19 +3359,25 @@ msgid ""
33423359"to hide implementation details. (Contributed by Victor Stinner in "
33433360":gh:`105387`.)"
33443361msgstr ""
3362+ "在 3.12 版的受限 C API 中,:c:func:`Py_INCREF` 和 :c:func:`Py_DECREF` "
3363+ "函数现在使用不透明函数调用的方式实现以隐藏实现细节。 (由 Victor Stinner 在 :gh:`105387` 中贡献。)"
33453364
33463365#: ../../whatsnew/3.12.rst:1749
33473366msgid ""
33483367"Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been "
33493368"removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``."
33503369msgstr ""
3370+ "基于 ``Py_UNICODE*`` 表示形式的旧式 Unicode API 已被移除。 请迁移到基于 UTF-8 或 ``wchar_t*`` 的 "
3371+ "API。"
33513372
33523373#: ../../whatsnew/3.12.rst:1752
33533374msgid ""
33543375"Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support "
33553376"``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to "
33563377"other formats for Unicode like ``s``, ``z``, ``es``, and ``U``."
33573378msgstr ""
3379+ ":c:func:`PyArg_ParseTuple` 等参数解析函数不再支持基于 ``Py_UNICODE*`` 的格式(例如 ``u``, ``Z``"
3380+ " 等)。 请迁移到其他 Unicode 格式如 ``s``, ``z``, ``es`` 和 ``U``。"
33583381
33593382#: ../../whatsnew/3.12.rst:1756
33603383msgid ""
@@ -3364,6 +3387,9 @@ msgid ""
33643387"breakage, consider using the existing public C-API instead, or, if "
33653388"necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro."
33663389msgstr ""
3390+ "``tp_weaklist`` 对于所有静态内置类型将始终为 ``NULL``。 这是 ``PyTypeObject`` "
3391+ "上的一个内部专属字段,但我们还是要指出这一变化以防有人碰巧仍然直接访问到该字段。 为避免出现中断,请考虑改用现有的公共 "
3392+ "C-API,或在必要时使用(仅限内部使用的)宏 ``_PyObject_GET_WEAKREFS_LISTPTR()``。 "
33673393
33683394#: ../../whatsnew/3.12.rst:1763
33693395msgid ""
@@ -3372,13 +3398,17 @@ msgid ""
33723398"this. We mention this in case someone happens to be accessing the internal-"
33733399"only field directly."
33743400msgstr ""
3401+ "现在这个内部专用的 :c:member:`PyTypeObject.tp_subclasses` 可能不是一个有效的对象指针。 "
3402+ "为了反映这一点我们将其类型改为 :c:expr:`void*`。 我们提到这一点是为了防止有人碰巧直接访问到这个内部专用字段。"
33753403
33763404#: ../../whatsnew/3.12.rst:1768
33773405msgid ""
33783406"To get a list of subclasses, call the Python method "
33793407":py:meth:`~class.__subclasses__` (using :c:func:`PyObject_CallMethod`, for "
33803408"example)."
33813409msgstr ""
3410+ "要获取子类的列表,请调用 Python 方法 :py:meth:`~class.__subclasses__` (例如使用 "
3411+ ":c:func:`PyObject_CallMethod`)。"
33823412
33833413#: ../../whatsnew/3.12.rst:1772
33843414msgid ""
@@ -3388,6 +3418,9 @@ msgid ""
33883418" :c:func:`PyUnicode_FromFormatV`. (Contributed by Serhiy Storchaka in "
33893419":gh:`98836`.)"
33903420msgstr ""
3421+ "在 :c:func:`PyUnicode_FromFormat` 和 :c:func:`PyUnicode_FromFormatV` "
3422+ "中添加对更多格式选项(左对齐、八进制、大写十六进制、:c:type:`intmax_t`、:c:type:`ptrdiff_t`、:c:type:`wchar_t`"
3423+ " C 字符串、可变宽度和精度)的支持。 (由 Serhiy Storchaka 在 :gh:`98836` 中贡献。)"
33913424
33923425#: ../../whatsnew/3.12.rst:1778
33933426msgid ""
@@ -3397,13 +3430,19 @@ msgid ""
33973430"the result string, and any extra arguments discarded. (Contributed by Serhiy"
33983431" Storchaka in :gh:`95781`.)"
33993432msgstr ""
3433+ ":c:func:`PyUnicode_FromFormat` 和 :c:func:`PyUnicode_FromFormatV` "
3434+ "中未被识别的格式字符现在会设置一个 :exc:`SystemError`。 "
3435+ "在之前的版本中它会导致格式字符串的所有其他部分被原样复制到结果字符串中,并丢弃任何额外的参数。 (由 Serhiy Storchaka 在 "
3436+ ":gh:`95781` 中贡献。)"
34003437
34013438#: ../../whatsnew/3.12.rst:1784
34023439msgid ""
34033440"Fixed wrong sign placement in :c:func:`PyUnicode_FromFormat` and "
34043441":c:func:`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in "
34053442":gh:`95504`.)"
34063443msgstr ""
3444+ "修复了 :c:func:`PyUnicode_FromFormat` 和 :c:func:`PyUnicode_FromFormatV` "
3445+ "中错误的标志位置。 (由 Philip Georgi 在 :gh:`95504` 中贡献。)"
34073446
34083447#: ../../whatsnew/3.12.rst:1788
34093448msgid ""
@@ -3754,6 +3793,9 @@ msgid ""
37543793":c:func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` "
37553794"instead. (Contributed by Mark Shannon in :gh:`101578`.)"
37563795msgstr ""
3796+ ":c:func:`PyErr_Fetch` 和 :c:func:`PyErr_Restore` 已被弃用。请使用 "
3797+ ":c:func:`PyErr_GetRaisedException` 和 :c:func:`PyErr_SetRaisedException` "
3798+ "代替。(由 Mark Shannon 在:gh:`101578` 贡献)。 "
37573799
37583800#: ../../whatsnew/3.12.rst:1939
37593801msgid ""
0 commit comments