@@ -283,12 +283,14 @@ msgid ""
283283"with Argument Clinic yet. For my example I'm using "
284284"``_pickle.Pickler.dump()``."
285285msgstr ""
286+ "找到一个调用 :c:func:`PyArg_ParseTuple` 或 :c:func:`PyArg_ParseTupleAndKeywords` "
287+ ",且未被转换为采用 Argument Clinic 的 Python 内置程序。这里用了 ``_pickle.Pickler.dump()``。"
286288
287289#: ../../howto/clinic.rst:164
288290msgid ""
289291"If the call to the ``PyArg_Parse`` function uses any of the following format"
290292" units:"
291- msgstr ""
293+ msgstr "如果对 ``PyArg_Parse`` 函数的调用采用了以下格式: "
292294
293295#: ../../howto/clinic.rst:176
294296msgid ""
@@ -297,6 +299,8 @@ msgid ""
297299"scenarios. But these are advanced topics—let's do something simpler for "
298300"your first function."
299301msgstr ""
302+ "或者多次调用 :c:func:`PyArg_ParseTuple`,则应再选一个函数。Argument Clinic *确实* 支持上述这些状况。 "
303+ "但这些都是高阶内容——第一次使用就简单一些吧。"
300304
301305#: ../../howto/clinic.rst:181
302306msgid ""
@@ -307,10 +311,13 @@ msgid ""
307311"to Argument Clinic. Argument Clinic doesn't support generic functions or "
308312"polymorphic parameters."
309313msgstr ""
314+ "此外,如果多次调用 :c:func:`PyArg_ParseTuple` 或 :c:func:`PyArg_ParseTupleAndKeywords`"
315+ " 且同一参数需支持不同的类型,或者用到 PyArg_Parse 以外的函数来解析参数,则可能不适合转换为 Argument Clinic。 "
316+ "Argument Clinic 不支持通用函数或多态参数。"
310317
311318#: ../../howto/clinic.rst:188
312319msgid "Add the following boilerplate above the function, creating our block::"
313- msgstr ""
320+ msgstr "在函数上方添加以下模板,创建块: "
314321
315322#: ../../howto/clinic.rst:193
316323msgid ""
@@ -320,6 +327,8 @@ msgid ""
320327" 80 characters. (Argument Clinic will preserve indents inside the "
321328"docstring.)"
322329msgstr ""
330+ "剪下文档字符串并粘贴到 ``[clinic]`` 行之间,去除所有的无用字符,使其成为一个正确引用的 C "
331+ "字符串。最有应该只留下带有左侧缩进的文本,且行宽不大于 80 个字符。(参数 Clinic 将保留文档字符串中的缩进。)"
323332
324333#: ../../howto/clinic.rst:199
325334msgid ""
@@ -328,13 +337,15 @@ msgid ""
328337"``help()`` on your builtin in the future, the first line will be built "
329338"automatically based on the function's signature.)"
330339msgstr ""
340+ "如果文档字符串的第一行看起来像是函数的签名,就把这一行去掉吧。((文档串不再需要用到它——将来对内置函数调用 ``help()`` "
341+ "时,第一行将根据函数的签名自动建立。)"
331342
332343#: ../../howto/clinic.rst:205 ../../howto/clinic.rst:226
333344#: ../../howto/clinic.rst:250 ../../howto/clinic.rst:308
334345#: ../../howto/clinic.rst:348 ../../howto/clinic.rst:375
335346#: ../../howto/clinic.rst:481 ../../howto/clinic.rst:533
336347msgid "Sample::"
337- msgstr ""
348+ msgstr "示例: "
338349
339350#: ../../howto/clinic.rst:211
340351msgid ""
@@ -343,12 +354,14 @@ msgid ""
343354"paragraph consisting of a single 80-column line at the beginning of the "
344355"docstring."
345356msgstr ""
357+ "如果文档字符串中没有“摘要”行,Argument Clinic 会报错。所以应确保带有摘要行。 "
358+ "“摘要”行应为在文档字符串开头的一个段落,由一个80列的单行构成。"
346359
347360#: ../../howto/clinic.rst:216
348361msgid ""
349362"(Our example docstring consists solely of a summary line, so the sample code"
350363" doesn't have to change for this step.)"
351- msgstr ""
364+ msgstr "(示例的文档字符串只包括一个摘要行,所以示例代码这一步不需改动)。 "
352365
353366#: ../../howto/clinic.rst:219
354367msgid ""
@@ -358,6 +371,8 @@ msgid ""
358371"module, include any sub-modules, and if the function is a method on a class "
359372"it should include the class name too."
360373msgstr ""
374+ "在文档字符串上方,输入函数的名称,后面是空行。这应是函数的 Python "
375+ "名称,而且应是句点分隔的完整路径——以模块的名称开始,包含所有子模块名,若函数为类方法则还应包含类名。"
361376
362377#: ../../howto/clinic.rst:234
363378msgid ""
0 commit comments