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

Skip to content

Commit 93b81a3

Browse files
[po] auto sync
1 parent e7941b5 commit 93b81a3

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

extending/newtypes_tutorial.po

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ msgid ""
1717
msgstr ""
1818
"Project-Id-Version: Python 3.7\n"
1919
"Report-Msgid-Bugs-To: \n"
20-
"POT-Creation-Date: 2023-03-17 14:40+0000\n"
20+
"POT-Creation-Date: 2023-03-24 14:40+0000\n"
2121
"PO-Revision-Date: 2019-09-01 03:36+0000\n"
2222
"Last-Translator: Freesand Leo <[email protected]>, 2023\n"
2323
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -695,6 +695,8 @@ msgid ""
695695
"of getter and setter functions that decide the attribute to get or set based"
696696
" on data in the closure.)"
697697
msgstr ""
698+
"读取函数接受一个 :class:`Custom` 对象和一个“闭包”,它是一个空指针。 在本例中,该闭包会被忽略。 "
699+
"(该闭包支持将定义数据传给读取器和设置器的进阶用法。 例如,这可以被用来允许单组读取和设置函数根据闭包中的数据来决定要读取或设置的属性。)"
698700

699701
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:586
700702
msgid ""
@@ -703,31 +705,34 @@ msgid ""
703705
" being deleted. In our setter, we raise an error if the attribute is "
704706
"deleted or if its new value is not a string."
705707
msgstr ""
708+
"设置器函数将接受 :class:`Custom` 对象、新值以及闭包。 新值可以为 ``NULL``,在此情况下属性将被删除。 "
709+
"在我们的设置器中,如果属性被删除或者如果它的新值不是字符串则我们将引发一个错误。"
706710

707711
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:591
708712
msgid "We create an array of :c:type:`PyGetSetDef` structures::"
709-
msgstr ""
713+
msgstr "我们创建一个 :c:type:`PyGetSetDef` 结构体的数组::"
710714

711715
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:601
712716
msgid "and register it in the :c:member:`~PyTypeObject.tp_getset` slot::"
713-
msgstr ""
717+
msgstr "并在 :c:member:`~PyTypeObject.tp_getset` 槽位中注册它::"
714718

715719
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:605
716720
msgid ""
717721
"The last item in a :c:type:`PyGetSetDef` structure is the \"closure\" "
718722
"mentioned above. In this case, we aren't using a closure, so we just pass "
719723
"``NULL``."
720724
msgstr ""
725+
"在 :c:type:`PyGetSetDef` 结构体中的最后一项是上面提到的“闭包”。 在本例中,我们没有使用闭包,因此我们只传入 ``NULL``。"
721726

722727
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:608
723728
msgid "We also remove the member definitions for these attributes::"
724-
msgstr ""
729+
msgstr "我们还移除了这些属性的成员定义::"
725730

726731
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:616
727732
msgid ""
728733
"We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only"
729734
" allow strings [#]_ to be passed::"
730-
msgstr ""
735+
msgstr "我们还需要将 :c:member:`~PyTypeObject.tp_init` 处理句柄更新为只允许传入字符串 [#]_::"
731736

732737
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:645
733738
msgid ""
@@ -738,6 +743,9 @@ msgid ""
738743
"these calls is in the ``tp_dealloc`` implementation, where there is the "
739744
"possibility that the initialization of these members failed in ``tp_new``."
740745
msgstr ""
746+
"通过这些更改,我们能够确保 ``first`` 和 ``last`` 成员一定不为 ``NULL`` 以便我们能在几乎所有情况下移除 ``NULL`` "
747+
"值检查。 这意味着大部分 :c:func:`Py_XDECREF` 调用都可以被转换为 :c:func:`Py_DECREF` 调用。 "
748+
"我们不能更改这些调用的唯一场合是在 ``tp_dealloc`` 实现中,那里这些成员的初始化有可能在 ``tp_new`` 中失败。"
741749

742750
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:652
743751
msgid ""

0 commit comments

Comments
 (0)