@@ -401,32 +401,35 @@ msgid ""
401401"C: the type declaration you'd use for a pointer to an instance of this "
402402"class, and a pointer to the :c:type:`PyTypeObject` for this class."
403403msgstr ""
404+ "在声明某个类时,还必须指定其 C 语言类型的两个部分:用于指向该类实例的指针的类型声明,和指向该类的 :c:type:`PyTypeObject` "
405+ "指针。"
404406
405407#: ../../howto/clinic.rst:266
406408msgid ""
407409"Declare each of the parameters to the function. Each parameter should get "
408410"its own line. All the parameter lines should be indented from the function "
409411"name and the docstring."
410- msgstr ""
412+ msgstr "声明函数的所有参数。每个参数都应另起一行。所有的参数行都应对齐函数名和文档字符串进行缩进。 "
411413
412414#: ../../howto/clinic.rst:270
413415msgid "The general form of these parameter lines is as follows:"
414- msgstr ""
416+ msgstr "这些参数行的常规形式如下: "
415417
416418#: ../../howto/clinic.rst:276
417419msgid "If the parameter has a default value, add that after the converter:"
418- msgstr ""
420+ msgstr "如果参数带有默认值,请加在转换器之后: "
419421
420422#: ../../howto/clinic.rst:283
421423msgid ""
422424"Argument Clinic's support for \" default values\" is quite sophisticated; "
423425"please see :ref:`the section below on default values <default_values>` for "
424426"more information."
425427msgstr ""
428+ "Argument Clinic 对 “缺省值” 的支持方式相当复杂;更多信息请参见 :ref:`关于缺省值的部分 <default_values>` 。"
426429
427430#: ../../howto/clinic.rst:287
428431msgid "Add a blank line below the parameters."
429- msgstr ""
432+ msgstr "在参数行下面添加一个空行。 "
430433
431434#: ../../howto/clinic.rst:289
432435msgid ""
@@ -436,6 +439,8 @@ msgid ""
436439"convenience syntax intended to make porting old code into Argument Clinic "
437440"easier."
438441msgstr ""
442+ " “转换器”是什么?它既确定了 C 语言要采用的变量类型,又确定了运行时将 Python 值转换成 C "
443+ "语言值的方法。现在需用到的是所谓“传统转换器”——快捷语法,旨在让旧代码更容易移植到 Argument Clinic。"
439444
440445#: ../../howto/clinic.rst:296
441446msgid ""
@@ -446,19 +451,23 @@ msgid ""
446451"parsing function what the type of the variable is and how to convert it. "
447452"For more on format units please see :ref:`arg-parsing`.)"
448453msgstr ""
454+ "每个参数都要从``PyArg_Parse()`` 格式参数中复制其 “格式单元”,并以带引号字符串的形式指定其转换器。(“格式单元”是 "
455+ "``format`` 参数的1-3个字符的正式名称,用于让参数解析函数知晓该变量的类型及转换方法。关于格式单位的更多信息,请参阅 :ref:`arg-"
456+ "parsing` )。"
449457
450458#: ../../howto/clinic.rst:305
451459msgid ""
452460"For multicharacter format units like ``z#``, use the entire two-or-three "
453461"character string."
454- msgstr ""
462+ msgstr "对于像 ``z#`` 这样的多字符格式单元,要使用2-3个字符组成的整个字符串。 "
455463
456464#: ../../howto/clinic.rst:323
457465msgid ""
458466"If your function has ``|`` in the format string, meaning some parameters "
459467"have default values, you can ignore it. Argument Clinic infers which "
460468"parameters are optional based on whether or not they have default values."
461469msgstr ""
470+ "如果函数的格式字符串包含 ``|``,意味着有些参数带有缺省值,这可以忽略。Argument Clinic 根据参数是否有缺省值来推断哪些参数是可选的。"
462471
463472#: ../../howto/clinic.rst:328
464473msgid ""
0 commit comments