Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe868d1

Browse files
[po] auto sync
1 parent 8ce0ace commit fe868d1

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

tutorial/controlflow.po

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ msgid ""
140140
":keyword:`for` statement is such a construct, while an example of function "
141141
"that takes an iterable is :func:`sum`::"
142142
msgstr ""
143+
"我们称这样的对象为 :term:`iterable`,也就是说,适合作为这样的目标对象:函数和结构期望从中获取连续的项直到所提供项全部耗尽。 "
144+
"我们已经看到 :keyword:`for` 语句就是这样一种结构,而接受可迭代对象的函数的一个例子是 :func:`sum`::"
143145

144146
#: ../../tutorial/controlflow.rst:151
145147
msgid ""
146148
"Later we will see more functions that return iterables and take iterables as"
147149
" arguments. Lastly, maybe you are curious about how to get a list from a "
148150
"range. Here is the solution::"
149-
msgstr ""
150-
"稍后我们将看到更多返回 iterables 并将 iterables "
151-
"作为参数的函数。最后,也许你会很好奇如何从一个指定范围内获取一个列表。以下是解决方案:"
151+
msgstr "稍后我们将看到更多返回可迭代对象以及将可迭代对象作为参数的函数。 最后,也许你会很好奇如何从一个指定范围内获取一个列表。 以下是解决方案:"
152152

153153
#: ../../tutorial/controlflow.rst:158
154154
msgid ""
@@ -178,6 +178,9 @@ msgid ""
178178
"loop is terminated by a :keyword:`break` statement. This is exemplified by "
179179
"the following loop, which searches for prime numbers::"
180180
msgstr ""
181+
"循环语句可能带有 :keyword:`!else` 子句;它会在循环耗尽了可迭代对象 (使用 :keyword:`for`) 或循环条件变为假值 (使用"
182+
" :keyword:`while`) 时被执行,但不会在循环被 :keyword:`break` 语句终止时被执行。 "
183+
"以下搜索素数的循环就是这样的一个例子::"
181184

182185
#: ../../tutorial/controlflow.rst:193
183186
msgid ""
@@ -195,6 +198,10 @@ msgid ""
195198
"``break`` occurs. For more on the :keyword:`!try` statement and exceptions, "
196199
"see :ref:`tut-handling`."
197200
msgstr ""
201+
"当和循环一起使用时,``else`` 子句与 :keyword:`try` 语句中的 ``else`` 子句的共同点多于 :keyword:`if` "
202+
"语句中的同类子句: a :keyword:`try` 语句中的 ``else`` 子句会在未发生异常时执行,而循环中的 ``else`` "
203+
"子句则会在未发生 ``break`` 时执行。 有关 :keyword:`!try` 语句和异常的更多信息,请参阅 :ref:`tut-"
204+
"handling`。"
198205

199206
#: ../../tutorial/controlflow.rst:203
200207
msgid ""
@@ -553,12 +560,15 @@ msgid ""
553560
"parameters. If there is no ``/`` in the function definition, there are no "
554561
"positional-only parameters."
555562
msgstr ""
563+
"在这里还可以发现更多细节,特定形参可以被标记为 *仅限位置*。 如果是 *仅限位置* 的形参,则其位置是重要的,并且该形参不能作为关键字传入。 "
564+
"仅限位置形参要放在 ``/`` (正斜杠) 之前。 这个 ``/`` 被用来从逻辑上分隔仅限位置形参和其它形参。 如果函数定义中没有 "
565+
"``/``,则表示没有仅限位置形参。"
556566

557567
#: ../../tutorial/controlflow.rst:574
558568
msgid ""
559569
"Parameters following the ``/`` may be *positional-or-keyword* or *keyword-"
560570
"only*."
561-
msgstr ""
571+
msgstr "在 ``/`` 之后的形参可以为 *位置或关键字* 或 *仅限关键字*。"
562572

563573
#: ../../tutorial/controlflow.rst:578
564574
msgid "Keyword-Only Arguments"
@@ -570,6 +580,8 @@ msgid ""
570580
"passed by keyword argument, place an ``*`` in the arguments list just before"
571581
" the first *keyword-only* parameter."
572582
msgstr ""
583+
"要将形参标记为 *仅限关键字*,即指明该形参必须以关键字参数的形式传入,应在参数列表的第一个 *keyword-only* 形参之前放置一个 "
584+
"``*``。"
573585

574586
#: ../../tutorial/controlflow.rst:586
575587
msgid "Function Examples"
@@ -579,32 +591,32 @@ msgstr "函数示例"
579591
msgid ""
580592
"Consider the following example function definitions paying close attention "
581593
"to the markers ``/`` and ``*``::"
582-
msgstr ""
594+
msgstr "请考虑以下示例函数定义并特别注意 ``/`` 和 ``*`` 标记::"
583595

584596
#: ../../tutorial/controlflow.rst:604
585597
msgid ""
586598
"The first function definition, ``standard_arg``, the most familiar form, "
587599
"places no restrictions on the calling convention and arguments may be passed"
588600
" by position or keyword::"
589-
msgstr ""
601+
msgstr "第一个函数定义 ``standard_arg`` 是最常见的形式,对调用方式没有任何限制,参数可以按位置也可以按关键字传入::"
590602

591603
#: ../../tutorial/controlflow.rst:614
592604
msgid ""
593605
"The second function ``pos_only_arg`` is restricted to only use positional "
594606
"parameters as there is a ``/`` in the function definition::"
595-
msgstr ""
607+
msgstr "第二个函数 ``pos_only_arg`` 在函数定义中带有 ``/``,限制仅使用位置形参。::"
596608

597609
#: ../../tutorial/controlflow.rst:625
598610
msgid ""
599611
"The third function ``kwd_only_args`` only allows keyword arguments as "
600612
"indicated by a ``*`` in the function definition::"
601-
msgstr ""
613+
msgstr "第三个函数 ``kwd_only_args`` 在函数定义中通过 ``*`` 指明仅允许关键字参数::"
602614

603615
#: ../../tutorial/controlflow.rst:636
604616
msgid ""
605617
"And the last uses all three calling conventions in the same function "
606618
"definition::"
607-
msgstr ""
619+
msgstr "而最后一个则在同一函数定义中使用了全部三种调用方式::"
608620

609621
#: ../../tutorial/controlflow.rst:656
610622
msgid ""

0 commit comments

Comments
 (0)