@@ -276,8 +276,8 @@ msgid ""
276276"for variables of enclosing functions, named in a :keyword:`nonlocal` "
277277"statement), although they may be referenced."
278278msgstr ""
279- "函数的 *执行* "
280- "引入新的函数局部变量符号表。函数的所有变量赋值都存在局部符号表里 ;引用变量时,首先,在局部符号表里查找变量,然后,是外层函数局部符号表,再是全局符号表,最后是内置名称符号表。因此,尽管可以引用全局变量和外层函数的变量,但最好不要在函数内直接赋值(除非是"
279+ "函数在 *执行* "
280+ "时使用函数局部变量符号表,所有函数变量赋值都存在局部符号表中 ;引用变量时,首先,在局部符号表里查找变量,然后,是外层函数局部符号表,再是全局符号表,最后是内置名称符号表。因此,尽管可以引用全局变量和外层函数的变量,但最好不要在函数内直接赋值(除非是"
281281" :keyword:`global` 语句定义的全局变量,或 :keyword:`nonlocal` 语句定义的外层函数的变量)。"
282282
283283#: ../../tutorial/controlflow.rst:294
@@ -513,22 +513,20 @@ msgid ""
513513" at the function definition to determine if items are passed by position, by"
514514" position or keyword, or by keyword."
515515msgstr ""
516- "默认情况下,函数的参数传递形式可以是位置参数或是显式的关键字参数。 "
517- "为了确保可读性和运行效率,限制允许的参数传递形式是有意义的,这样开发者只需查看函数定义即可确定参数项是仅按位置、按位置也按关键字 ,还是仅按关键字传递。"
516+ "默认情况下,参数可以按位置或显式关键字传递给 Python "
517+ "函数。为了让代码易读和代码性能,最好限制参数的传递方式,这样,开发者只需查看函数定义,即可确定参数项是仅按位置、按位置或关键字 ,还是仅按关键字传递。"
518518
519519#: ../../tutorial/controlflow.rst:538
520520msgid "A function definition may look like:"
521- msgstr "函数的定义看起来可以像是这样 :"
521+ msgstr "函数定义如下 :"
522522
523523#: ../../tutorial/controlflow.rst:549
524524msgid ""
525525"where ``/`` and ``*`` are optional. If used, these symbols indicate the kind"
526526" of parameter by how the arguments may be passed to the function: "
527527"positional-only, positional-or-keyword, and keyword-only. Keyword parameters"
528528" are also referred to as named parameters."
529- msgstr ""
530- "在这里 ``/`` 和 ``*`` 是可选的。 如果使用这些符号则表明可以通过何种形参将参数值传递给函数:仅限位置、位置或关键字,以及仅限关键字。 "
531- "关键字形参也被称为命名形参。"
529+ msgstr "``/`` 和 ``*`` 是可选的。这些符号表明形参如何把参数值传递给函数:位置、位置或关键字、关键字。关键字形参也叫作命名形参。"
532530
533531#: ../../tutorial/controlflow.rst:556
534532msgid "Positional-or-Keyword Arguments"
@@ -538,11 +536,11 @@ msgstr "位置或关键字参数"
538536msgid ""
539537"If ``/`` and ``*`` are not present in the function definition, arguments may"
540538" be passed to a function by position or by keyword."
541- msgstr "如果函数定义中未使用 ``/`` 和 ``*``,则参数可以按位置或按关键字传递给函数 。"
539+ msgstr "函数定义中未使用 ``/`` 和 ``*`` 时,参数可以按位置或关键字传递给函数 。"
542540
543541#: ../../tutorial/controlflow.rst:563
544542msgid "Positional-Only Parameters"
545- msgstr "仅限位置参数 "
543+ msgstr "仅位置参数 "
546544
547545#: ../../tutorial/controlflow.rst:565
548546msgid ""
0 commit comments