@@ -511,6 +511,8 @@ msgid ""
511511"wrapped up in a tuple (see :ref:`tut-tuples`). Before the variable number "
512512"of arguments, zero or more normal arguments may occur. ::"
513513msgstr ""
514+ "最后,最不常用的选项是可以使用任意数量的参数调用函数。这些参数会被包含在一个元组里(参见 :ref:`tut-tuples` "
515+ ")。在可变数量的参数之前,可能会出现零个或多个普通参数。::"
514516
515517#: ../../tutorial/controlflow.rst:540
516518msgid ""
@@ -520,10 +522,12 @@ msgid ""
520522"``*args`` parameter are 'keyword-only' arguments, meaning that they can only"
521523" be used as keywords rather than positional arguments. ::"
522524msgstr ""
525+ "一般来说,这些 ``可变参数`` 将在形式参数列表的末尾,因为它们收集传递给函数的所有剩余输入参数。出现在 ``*args`` "
526+ "参数之后的任何形式参数都是 ‘仅关键字参数’,也就是说它们只能作为关键字参数而不能是位置参数。::"
523527
524528#: ../../tutorial/controlflow.rst:557
525529msgid "Unpacking Argument Lists"
526- msgstr "参数列表的展开 "
530+ msgstr "解包参数列表 "
527531
528532#: ../../tutorial/controlflow.rst:559
529533msgid ""
@@ -534,12 +538,14 @@ msgid ""
534538"separately, write the function call with the ``*``\\ -operator to unpack "
535539"the arguments out of a list or tuple::"
536540msgstr ""
541+ "当参数已经在列表或元组中但要为需要单独位置参数的函数调用解包时,会发生相反的情况。例如,内置的 :func:`range` 函数需要单独的 "
542+ "*start* 和 *stop* 参数。如果它们不能单独使用,可以使用 ``*``\\ -操作符 来编写函数调用以便从列表或元组中解包参数::"
537543
538544#: ../../tutorial/controlflow.rst:575
539545msgid ""
540546"In the same fashion, dictionaries can deliver keyword arguments with the "
541547"``**``\\ -operator::"
542- msgstr ""
548+ msgstr "同样的方式,字典可使用 ``**`` \\ -操作符 来提供关键字参数:: "
543549
544550#: ../../tutorial/controlflow.rst:591
545551msgid "Lambda Expressions"
@@ -555,12 +561,14 @@ msgid ""
555561"function definitions, lambda functions can reference variables from the "
556562"containing scope::"
557563msgstr ""
564+ "可以用 :keyword:`lambda` 关键字来创建一个小的匿名函数。这个函数返回两个参数的和: ``lambda a, b: a+b`` "
565+ "。Lambda函数可以在需要函数对象的任何地方使用。它们在语法上限于单个表达式。从语义上来说,它们只是正常函数定义的语法糖。与嵌套函数定义一样,lambda函数可以引用包含范围的变量::"
558566
559567#: ../../tutorial/controlflow.rst:610
560568msgid ""
561569"The above example uses a lambda expression to return a function. Another "
562570"use is to pass a small function as an argument::"
563- msgstr ""
571+ msgstr "上面的例子使用一个lambda表达式来返回一个函数。另一个用法是传递一个小函数作为参数:: "
564572
565573#: ../../tutorial/controlflow.rst:622
566574msgid "Documentation Strings"
@@ -570,7 +578,7 @@ msgstr "文档字符串"
570578msgid ""
571579"Here are some conventions about the content and formatting of documentation "
572580"strings."
573- msgstr ""
581+ msgstr "以下是有关文档字符串的内容和格式的一些约定。 "
574582
575583#: ../../tutorial/controlflow.rst:632
576584msgid ""
0 commit comments