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

Skip to content

Commit 818bb8b

Browse files
[po] auto sync
1 parent c2ee9ec commit 818bb8b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

extending/newtypes_tutorial.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,14 @@ msgid ""
798798
"needs to fill two additional slots and to enable a flag that enables these "
799799
"slots:"
800800
msgstr ""
801+
"要允许一个参加引用循环的 :class:`Custom` 实例被循环 GC 正确地删除并回收,我们的 :class:`Custom` "
802+
"类型需要填充两个额外槽位并增加启用这些槽位的旗标:"
801803

802804
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:696
803805
msgid ""
804806
"First, the traversal method lets the cyclic GC know about subobjects that "
805807
"could participate in cycles::"
806-
msgstr ""
808+
msgstr "首先,遍历方法让循环 GC 知道能够参加循环的子对象::"
807809

808810
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:716
809811
msgid ""
@@ -813,19 +815,25 @@ msgid ""
813815
"argument *arg* passed to the traversal method. It returns an integer value "
814816
"that must be returned if it is non-zero."
815817
msgstr ""
818+
"对于每个能够参加循环的子对象,我们需要调用 :c:func:`visit` 函数,向它传入该遍历方法。 :c:func:`visit` "
819+
"函数接受该子对象作为参数并接受传给遍历方法的额外参数 *arg*。 它返回一个必须在非零时返回的整数值。"
816820

817821
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:722
818822
msgid ""
819823
"Python provides a :c:func:`Py_VISIT` macro that automates calling visit "
820824
"functions. With :c:func:`Py_VISIT`, we can minimize the amount of "
821825
"boilerplate in ``Custom_traverse``::"
822826
msgstr ""
827+
"Python 提供了一个可自动调用 visit 函数的 :c:func:`Py_VISIT` 宏。 使用 "
828+
":c:func:`Py_VISIT`,我们可以最小化 ``Custom_traverse`` 中的准备工作量::"
823829

824830
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:735
825831
msgid ""
826832
"The :c:member:`~PyTypeObject.tp_traverse` implementation must name its "
827833
"arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`."
828834
msgstr ""
835+
":c:member:`~PyTypeObject.tp_traverse` 实现必须将其参数准确命名为 *visit* 和 *arg* 以便使用 "
836+
":c:func:`Py_VISIT`。"
829837

830838
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:738
831839
msgid ""

0 commit comments

Comments
 (0)