@@ -348,10 +348,10 @@ msgid ""
348348"efficient."
349349msgstr ""
350350"``result.append(a)`` 语句调用了列表对象 ``result`` 的 *方法* 。方法是“从属于”对象的函数,命名为 "
351- "``obj.methodname``,其中, ``obj`` 是对象(也可以是表达式), ``methodname`` "
352- "是对象类型定义的方法名称。不同类型定义的方法不同。不同类型的方法可以有相同的名称,还不会引起歧义。( *类* 可以定义自定义对象类型和方法 ,详见 :ref"
353- ":`tut-classes` )示例中的方法 :meth:`append` 是为列表对象定义的;用于在列表的末尾添加新元素 。本例中,它相当于 "
354- "``result = result + [a]`` ,但更高效 。"
351+ "``obj.methodname``,``obj`` 是对象(也可以是表达式),``methodname`` "
352+ "是对象类型定义的方法名。不同类型定义不同的方法,不同类型的方法名可以相同,且不会不会引起歧义。(用 *类* 可以自定义对象类型和方法 ,详见 :ref"
353+ ":`tut-classes` )示例中的方法 :meth:`append` 是为列表对象定义的,用于在列表末尾添加新元素 。本例中,该方法相当于 "
354+ "``result = result + [a]`` ,但更有效 。"
355355
356356#: ../../tutorial/controlflow.rst:359
357357msgid "More on Defining Functions"
@@ -382,7 +382,7 @@ msgstr "该函数可以用以下方式调用:"
382382msgid ""
383383"giving only the mandatory argument: ``ask_ok('Do you really want to "
384384"quit?')``"
385- msgstr "只给出必需的参数 :``ask_ok('Do you really want to quit?')``"
385+ msgstr "只给出必选参数 :``ask_ok('Do you really want to quit?')``"
386386
387387#: ../../tutorial/controlflow.rst:390
388388msgid ""
@@ -431,7 +431,7 @@ msgstr "输出结果如下:"
431431msgid ""
432432"If you don't want the default to be shared between subsequent calls, you can"
433433" write the function like this instead::"
434- msgstr "不需要在后续调用之间共享默认值时 ,应以如下方式编写函数:"
434+ msgstr "不想在后续调用之间共享默认值时 ,应以如下方式编写函数:"
435435
436436#: ../../tutorial/controlflow.rst:443
437437msgid "Keyword Arguments"
@@ -442,7 +442,8 @@ msgid ""
442442"Functions can also be called using :term:`keyword arguments <keyword "
443443"argument>` of the form ``kwarg=value``. For instance, the following "
444444"function::"
445- msgstr "也可以用 ``kwarg=value`` 形式 :term:`关键字参数 <keyword argument>` 调用函数。例如:"
445+ msgstr ""
446+ "``kwarg=value`` 形式的 :term:`关键字参数 <keyword argument>` 也可以用于调用函数。函数示例如下:"
446447
447448#: ../../tutorial/controlflow.rst:454
448449msgid ""
@@ -455,7 +456,7 @@ msgstr ""
455456
456457#: ../../tutorial/controlflow.rst:465
457458msgid "but all the following calls would be invalid::"
458- msgstr "但下面的函数调用方式都是无效的 :"
459+ msgstr "以下函数调用方式都是无效的 :"
459460
460461#: ../../tutorial/controlflow.rst:472
461462msgid ""
@@ -481,24 +482,24 @@ msgid ""
481482"positional arguments beyond the formal parameter list. (``*name`` must "
482483"occur before ``**name``.) For example, if we define a function like this::"
483484msgstr ""
484- "当存在一个形式为 ``**name`` 的最后一个形参时,它会接收一个字典 (参见 "
485- ":ref:`typesmapping`),其中包含除了与已有形参相对应的关键字参数以外的所有关键字参数。 这可以与一个形式为 "
486- "``*name``,接收一个包含除了与已有形参列表以外的位置参数的 :ref:`元组 <tut-tuples>` 的形参 (将在下一小节介绍) 组合使用 "
487- " (``*name`` 必须出现在 ``**name`` 之前。) 例如,如果我们这样定义一个函数:: "
485+ "最后一个形参为 ``**name`` 形式时,接收一个字典(详见 "
486+ ":ref:`typesmapping`),该字典包含与函数中已定义形参对应之外的所有关键字参数。``**name`` 形参可以与 ``*name`` "
487+ "形参(下一小节介绍)组合使用( ``*name`` 必须在 ``**name`` 前面), ``*name`` 形参接收一个 :ref:`元组 <tut-"
488+ "tuples>`,该元组包含形参列表之外的位置参数。 例如,可以定义下面这样的函数: "
488489
489490#: ../../tutorial/controlflow.rst:505
490491msgid "It could be called like this::"
491- msgstr "它可以像这样调用:: "
492+ msgstr "该函数可以用如下方式调用: "
492493
493494#: ../../tutorial/controlflow.rst:513
494495msgid "and of course it would print:"
495- msgstr "当然它会打印:: "
496+ msgstr "输出结果如下: "
496497
497498#: ../../tutorial/controlflow.rst:526
498499msgid ""
499500"Note that the order in which the keyword arguments are printed is guaranteed"
500501" to match the order in which they were provided in the function call."
501- msgstr "注意打印时关键字参数的顺序保证与调用函数时提供它们的顺序是相匹配的 。"
502+ msgstr "注意,关键字参数在输出结果中的顺序与调用函数时的顺序一致 。"
502503
503504#: ../../tutorial/controlflow.rst:530
504505msgid "Special parameters"
0 commit comments