@@ -4858,19 +4858,26 @@ msgid ""
4858
4858
" steals a reference to the value. (Contributed by Serhiy Storchaka in "
4859
4859
":gh:`86493`.)"
4860
4860
msgstr ""
4861
+ "增加了 :c:func:`PyModule_Add` 函数,它类似于 :c:func:`PyModule_AddObjectRef` 和 "
4862
+ ":c:func:`PyModule_AddObject`,但总是会偷取一个对值的引用。 (由 Serhiy Storchaka 在 "
4863
+ ":gh:`86493` 中贡献。)"
4861
4864
4862
4865
#: ../../whatsnew/3.13.rst:2190
4863
4866
msgid ""
4864
4867
"Add the :c:func:`PyObject_GenericHash` function that implements the default "
4865
4868
"hashing function of a Python object. (Contributed by Serhiy Storchaka in "
4866
4869
":gh:`113024`.)"
4867
4870
msgstr ""
4871
+ "增加了实现 Python 对象的默认哈希函数的 :c:func:`PyObject_GenericHash` 函数。 (由 Serhiy "
4872
+ "Storchaka 在 :gh:`113024` 中贡献。)"
4868
4873
4869
4874
#: ../../whatsnew/3.13.rst:2194
4870
4875
msgid ""
4871
4876
"Add the :c:func:`Py_HashPointer` function to hash a raw pointer. "
4872
4877
"(Contributed by Victor Stinner in :gh:`111545`.)"
4873
4878
msgstr ""
4879
+ "增加了 :c:func:`Py_HashPointer` 函数用于对原始指针执行哈希运算。 (由 Victor Stinner 在 "
4880
+ ":gh:`111545` 中贡献。)"
4874
4881
4875
4882
#: ../../whatsnew/3.13.rst:2197
4876
4883
msgid ""
@@ -4920,6 +4927,9 @@ msgid ""
4920
4927
"name. This is equivalent to getting the :attr:`type.__module__` attribute. "
4921
4928
"(Contributed by Eric Snow and Victor Stinner in :gh:`111696`.)"
4922
4929
msgstr ""
4930
+ "增加了 :c:func:`PyType_GetModuleName` 函数用来获取类型的模块名称。 这等价于获取 "
4931
+ ":attr:`type.__module__` 属性。 (由 Eric Snow 和 Victor Stinner 在 :gh:`111696` "
4932
+ "中贡献。)"
4923
4933
4924
4934
#: ../../whatsnew/3.13.rst:2233
4925
4935
msgid ""
@@ -5158,6 +5168,10 @@ msgid ""
5158
5168
":c:func:`PyObject_GetBuffer` will succeed. To test if the object is actually"
5159
5169
" readable, see the next example of :c:func:`PyObject_GetBuffer`."
5160
5170
msgstr ""
5171
+ ":c:func:`!PyObject_CheckReadBuffer`: 使用 :c:func:`PyObject_CheckBuffer` "
5172
+ "来测试对象是否支持缓冲区协议。 请注意 :c:func:`PyObject_CheckBuffer` 并不保证 "
5173
+ ":c:func:`PyObject_GetBuffer` 会成功。 要测试对象是否确实可读,参见下面的 "
5174
+ ":c:func:`PyObject_GetBuffer` 示例。"
5161
5175
5162
5176
#: ../../whatsnew/3.13.rst:2359
5163
5177
msgid ""
@@ -5235,6 +5249,11 @@ msgid ""
5235
5249
":c:func:`PyObject_Call`, pass an empty tuple as positional arguments using "
5236
5250
":c:func:`PyTuple_New(0) <PyTuple_New>`."
5237
5251
msgstr ""
5252
+ "在 :c:func:`PyObject_Call` 中,位置参数必须是 :class:`tuple` 且不可为 ``NULL``,而关键字参数必须是 "
5253
+ ":class:`dict` 或 ``NULL``,但是被移除的函数会检查参数类型且接受 ``NULL`` 位置参数和关键字参数。 要将 "
5254
+ "``PyEval_CallObjectWithKeywords(func, NULL, kwargs)`` 替换为 "
5255
+ ":c:func:`PyObject_Call`,请使用 :c:func:`PyTuple_New(0) <PyTuple_New>` "
5256
+ "传入一个空元组作为位置参数。"
5238
5257
5239
5258
#: ../../whatsnew/3.13.rst:2403
5240
5259
msgid ""
@@ -5368,13 +5387,20 @@ msgid ""
5368
5387
":c:func:`PyInterpreterState_Get()` on Python 3.8 and older. (Contributed by "
5369
5388
"Victor Stinner in :gh:`106320`.)"
5370
5389
msgstr ""
5390
+ "移除了 :c:func:`PyInterpreterState_Get()` 的别名 "
5391
+ ":c:func:`!_PyInterpreterState_Get`,它曾经因要向下兼容 Python 3.8 而被保留。 在 Python 3.8 "
5392
+ "及更旧版本中可以使用 `pythoncapi-compat project`_ 来获得 "
5393
+ ":c:func:`PyInterpreterState_Get()`。 (由 Victor Stinner 在 :gh:`106320` 中贡献。)"
5371
5394
5372
5395
#: ../../whatsnew/3.13.rst:2462
5373
5396
msgid ""
5374
5397
"Remove the private :c:func:`!_PyObject_FastCall` function: use "
5375
5398
":c:func:`!PyObject_Vectorcall` which is available since Python 3.8 "
5376
5399
"(:pep:`590`). (Contributed by Victor Stinner in :gh:`106023`.)"
5377
5400
msgstr ""
5401
+ "移除了私有的 :c:func:`!_PyObject_FastCall` 函数:请使用自 Python 3.8 起增加的 "
5402
+ ":c:func:`!PyObject_Vectorcall` (:pep:`590`)。 (由 Victor Stinner 在 "
5403
+ ":gh:`106023` 中贡献。)"
5378
5404
5379
5405
#: ../../whatsnew/3.13.rst:2467
5380
5406
msgid ""
@@ -5940,6 +5966,9 @@ msgid ""
5940
5966
"bundled mimalloc has custom changes, see :gh:`113141` for details. "
5941
5967
"(Contributed by Dino Viehland in :gh:`109914`.)"
5942
5968
msgstr ""
5969
+ "现在 CPython 默认会捆绑 `mimalloc library`_。 它使用 MIT 许可证提供许可;请参阅 :ref:`mimalloc "
5970
+ "license <mimalloc-license>`。 捆绑的 mimalloc 带有定制的修改,详情参见 :gh:`113141`。 (由 Dino"
5971
+ " Viehland 在 :gh:`109914` 中贡献。)"
5943
5972
5944
5973
#: ../../whatsnew/3.13.rst:2583
5945
5974
msgid ""
0 commit comments