@@ -3648,19 +3648,25 @@ msgid ""
36483648":c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag. This makes it acceptable "
36493649"for ``PyType_From*`` functions."
36503650msgstr ""
3651+ "如果元类不需要从 Python 执行实例化,则使用 :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` 旗标将其 "
3652+ "``tp_new`` 设为 ``NULL``。 这将使其可被 ``PyType_From*`` 函数接受。"
36513653
36523654#: ../../whatsnew/3.12.rst:1903
36533655msgid ""
36543656"Avoid ``PyType_From*`` functions: if you don't need C-specific features "
36553657"(slots or setting the instance size), create types by :ref:`calling <call>` "
36563658"the metaclass."
36573659msgstr ""
3660+ "避免使用 ``PyType_From*`` 函数:如果不需要 C 专属的特性(槽位或设置实例大小),请通过 :ref:`调用 <call>` "
3661+ "元类来创建类型。"
36583662
36593663#: ../../whatsnew/3.12.rst:1907
36603664msgid ""
36613665"If you *know* the ``tp_new`` can be skipped safely, filter the deprecation "
36623666"warning out using :func:`warnings.catch_warnings` from Python."
36633667msgstr ""
3668+ "如果你 *知道* 可以安全地跳过 ``tp_new``,就使用 Python 中的 :func:`warnings.catch_warnings` "
3669+ "过滤掉弃用警告。"
36643670
36653671#: ../../whatsnew/3.12.rst:1910
36663672msgid ""
@@ -3669,6 +3675,9 @@ msgid ""
36693675"because clients generally rely on process-wide global state (since these "
36703676"callbacks have no way of recovering extension module state)."
36713677msgstr ""
3678+ ":c:var:`PyOS_InputHook` 和 :c:var:`PyOS_ReadlineFunctionPointer` 将不再在 "
3679+ ":ref:`子解释器 <sub-interpreter-support>` 中被调用。 "
3680+ "这是因为客户端通常依赖进程级的全局状态(而这些回调没有办法恢复扩展模块状态)。"
36723681
36733682#: ../../whatsnew/3.12.rst:1915
36743683msgid ""
@@ -3811,6 +3820,8 @@ msgid ""
38113820":c:var:`!Py_HasFileSystemDefaultEncoding`: use "
38123821":c:member:`PyConfig.filesystem_encoding`"
38133822msgstr ""
3823+ ":c:var:`!Py_HasFileSystemDefaultEncoding`: 使用 "
3824+ ":c:member:`PyConfig.filesystem_encoding`"
38143825
38153826#: ../../whatsnew/3.12.rst:1962
38163827msgid ""
@@ -3841,24 +3852,28 @@ msgid ""
38413852"Creating immutable types (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable "
38423853"bases is deprecated and will be disabled in Python 3.14."
38433854msgstr ""
3855+ "使用可变基类创建不可变类型 (:c:macro:`Py_TPFLAGS_IMMUTABLETYPE`) 的做法已被弃用并将在 Python 3.14 "
3856+ "中禁用。"
38443857
38453858#: ../../whatsnew/3.12.rst:1972
38463859msgid ""
38473860"The ``structmember.h`` header is deprecated, though it continues to be "
38483861"available and there are no plans to remove it."
3849- msgstr ""
3862+ msgstr "``structmember.h`` 头文件已被弃用,不过它仍可继续使用也没有计划将其移除。 "
38503863
38513864#: ../../whatsnew/3.12.rst:1975
38523865msgid ""
38533866"Its contents are now available just by including ``Python.h``, with a ``Py``"
38543867" prefix added if it was missing:"
3855- msgstr ""
3868+ msgstr "现在只需包括 ``Python.h`` 即可获得其内容,如果找不到请添加 ``Py`` 前缀: "
38563869
38573870#: ../../whatsnew/3.12.rst:1978
38583871msgid ""
38593872":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and "
38603873":c:func:`PyMember_SetOne`"
38613874msgstr ""
3875+ ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` 和 "
3876+ ":c:func:`PyMember_SetOne`"
38623877
38633878#: ../../whatsnew/3.12.rst:1980
38643879msgid ""
0 commit comments