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

Skip to content

Commit 5dc3bfa

Browse files
committed
[po] auto sync bot
1 parent 902604b commit 5dc3bfa

4 files changed

Lines changed: 42 additions & 9 deletions

File tree

tutorial/controlflow.po

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ msgid ""
177177
"loop is terminated by a :keyword:`break` statement. This is exemplified by "
178178
"the following loop, which searches for prime numbers::"
179179
msgstr ""
180+
"循环语句可能带有一个 :keyword:`!else` 子句;它会在循环遍历完列表 (使用 :keyword:`for`) 或是在条件变为假 (使用 "
181+
":keyword:`while`) 的时候被执行,但是不会在循环被 :keyword:`break` 语句终止时被执行。 "
182+
"这可以通过以下搜索素数的循环为例来进行说明::"
180183

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

198204
#: ../../tutorial/controlflow.rst:197
199205
msgid ""
@@ -222,6 +228,8 @@ msgid ""
222228
"to keep thinking at a more abstract level. The :keyword:`!pass` is silently"
223229
" ignored::"
224230
msgstr ""
231+
":keyword:`pass` 的另一个可以使用的场合是在你编写新的代码时作为一个函数或条件子句体的占位符,允许你保持在更抽象的层次上进行思考。 "
232+
":keyword:`!pass` 会被静默地忽略::"
225233

226234
#: ../../tutorial/controlflow.rst:243
227235
msgid "Defining Functions"
@@ -322,6 +330,8 @@ msgid ""
322330
":keyword:`!return` without an expression argument returns ``None``. Falling "
323331
"off the end of a function also returns ``None``."
324332
msgstr ""
333+
":keyword:`return` 语句会从函数内部返回一个值。 不带表达式参数的 :keyword:`!return` 会返回 ``None``。 "
334+
"函数执行完毕退出也会返回 ``None``。"
325335

326336
#: ../../tutorial/controlflow.rst:337
327337
msgid ""
@@ -639,6 +649,10 @@ msgid ""
639649
"following example has a positional argument, a keyword argument, and the "
640650
"return value annotated::"
641651
msgstr ""
652+
":term:`函数标注 <function annotation>` 以字典的形式存放在函数的 :attr:`__annotations__` "
653+
"属性中,并且不会影响函数的任何其他部分。 形参标注的定义方式是在形参名称后加上冒号,后面跟一个表达式,该表达式会被求值为标注的值。 "
654+
"返回值标注的定义方式是加上一个组合符号 ``->``,后面跟一个表达式,该标注位于形参列表和表示 :keyword:`def` 语句结束的冒号之间。 "
655+
"下面的示例有一个位置参数,一个关键字参数以及返回值带有相应标注::"
642656

643657
#: ../../tutorial/controlflow.rst:707
644658
msgid "Intermezzo: Coding Style"

tutorial/datastructures.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ msgid ""
215215
":keyword:`!if` clauses which follow it. For example, this listcomp combines "
216216
"the elements of two lists if they are not equal::"
217217
msgstr ""
218+
"列表推导式的结构是由一对方括号所包含的以下内容:一个表达式,后面跟一个 :keyword:`!for` 子句,然后是零个或多个 "
219+
":keyword:`!for` 或 :keyword:`!if` 子句。 其结果将是一个新列表,由对表达式依据后面的 :keyword:`!for` 和"
220+
" :keyword:`!if` 子句的内容进行求值计算而得出。 举例来说,以下列表推导式会将两个列表中不相等的元素组合起来::"
218221

219222
#: ../../tutorial/datastructures.rst:228
220223
msgid "and it's equivalent to::"
@@ -292,6 +295,8 @@ msgid ""
292295
"used to remove slices from a list or clear the entire list (which we did "
293296
"earlier by assignment of an empty list to the slice). For example::"
294297
msgstr ""
298+
"有一种方式可以从列表按照给定的索引而不是值来移除一个元素: 那就是 :keyword:`del` 语句。 它不同于会返回一个值的 :meth:`pop`"
299+
" 方法。 :keyword:`!del` 语句也可以用来从列表中移除切片或者清空整个列表(我们之前用过的方式是将一个空列表赋值给指定的切片)。 例如::"
295300

296301
#: ../../tutorial/datastructures.rst:353
297302
msgid ":keyword:`del` can also be used to delete entire variables::"

tutorial/errors.po

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2018, Python Software Foundation
2+
# Copyright (C) 2001-2019, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
77
# ww song <[email protected]>, 2018
8-
# Larry wang <[email protected]>, 2018
8+
# Larry Wang <[email protected]>, 2018
99
# Woostundy <[email protected]>, 2018
10-
# Freesand Leo <[email protected]>, 2018
1110
# Junkai Shao <[email protected]>, 2018
11+
# Freesand Leo <[email protected]>, 2019
1212
#
1313
#, fuzzy
1414
msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.7\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2018-12-20 10:06+0900\n"
18+
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1919
"PO-Revision-Date: 2017-02-16 23:40+0000\n"
20-
"Last-Translator: Junkai Shao <skaifun.dev@gmail.com>, 2018\n"
20+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
2121
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2222
"MIME-Version: 1.0\n"
2323
"Content-Type: text/plain; charset=UTF-8\n"
@@ -172,6 +172,9 @@ msgid ""
172172
"not in other handlers of the same :keyword:`!try` statement. An except "
173173
"clause may name multiple exceptions as a parenthesized tuple, for example::"
174174
msgstr ""
175+
"一个 :keyword:`try` 语句可能有多个 except 子句,以指定不同异常的处理程序。 最多会执行一个处理程序。 处理程序只处理相应的 "
176+
"try 子句中发生的异常,而不处理同一 :keyword:`!try` 语句内其他处理程序中的异常。 一个 except "
177+
"子句可以将多个异常命名为带括号的元组,例如::"
175178

176179
#: ../../tutorial/errors.rst:123
177180
msgid ""
@@ -220,6 +223,8 @@ msgid ""
220223
"exception that wasn't raised by the code being protected by the "
221224
":keyword:`!try` ... :keyword:`!except` statement."
222225
msgstr ""
226+
"使用 :keyword:`!else` 子句比向 :keyword:`try` 子句添加额外的代码要好,因为它避免了意外捕获由 "
227+
":keyword:`!try` ... :keyword:`!except` 语句保护的代码未引发的异常。"
223228

224229
#: ../../tutorial/errors.rst:188
225230
msgid ""
@@ -344,6 +349,11 @@ msgid ""
344349
" left via a :keyword:`break`, :keyword:`continue` or :keyword:`return` "
345350
"statement. A more complicated example::"
346351
msgstr ""
352+
"*finally 子句* 总会在离开 :keyword:`try` 语句前被执行,无论是否发生了异常。 当在 :keyword:`!try` "
353+
"子句中发生了异常且尚未被 :keyword:`except` 子句处理(或者它发生在 :keyword:`!except` 或 "
354+
":keyword:`!else` 子句中)时,它将在 :keyword:`finally` 子句执行后被重新抛出。 当 :keyword:`!try` "
355+
"语句的任何其他子句通过 :keyword:`break`, :keyword:`continue` 或 :keyword:`return` "
356+
"语句离开时,:keyword:`!finally` 也会在“离开之前”被执行,一个更复杂的例子::"
347357

348358
#: ../../tutorial/errors.rst:377
349359
msgid ""
@@ -352,6 +362,8 @@ msgid ""
352362
":keyword:`except` clause and therefore re-raised after the "
353363
":keyword:`!finally` clause has been executed."
354364
msgstr ""
365+
"正如你所看到的,:keyword:`finally` 子句在任何情况下都会被执行。 两个字符串相除所引发的 :exc:`TypeError` 不会由 "
366+
":keyword:`except` 子句处理,因此会在 :keyword:`!finally` 子句执行后被重新引发。"
355367

356368
#: ../../tutorial/errors.rst:382
357369
msgid ""

tutorial/inputoutput.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2018, Python Software Foundation
2+
# Copyright (C) 2001-2019, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
77
# cissoid <[email protected]>, 2018
88
# Junkai Shao <[email protected]>, 2018
9-
# Freesand Leo <[email protected]>, 2018
9+
# Freesand Leo <[email protected]>, 2019
1010
#
1111
#, fuzzy
1212
msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.7\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2018-12-20 10:06+0900\n"
16+
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1717
"PO-Revision-Date: 2017-02-16 23:40+0000\n"
18-
"Last-Translator: Freesand Leo <[email protected]>, 2018\n"
18+
"Last-Translator: Freesand Leo <[email protected]>, 2019\n"
1919
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2020
"MIME-Version: 1.0\n"
2121
"Content-Type: text/plain; charset=UTF-8\n"
@@ -344,6 +344,8 @@ msgid ""
344344
":keyword:`!with` is also much shorter than writing equivalent "
345345
":keyword:`try`\\ -\\ :keyword:`finally` blocks::"
346346
msgstr ""
347+
"在处理文件对象时,最好使用 :keyword:`with` 关键字。 优点是当子句体结束后文件会正确关闭,即使在某个时刻引发了异常。 而且使用 "
348+
":keyword:`!with` 相比等效的 :keyword:`try`\\ -\\ :keyword:`finally` 代码块要简短得多::"
347349

348350
#: ../../tutorial/inputoutput.rst:328
349351
msgid ""

0 commit comments

Comments
 (0)