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

Skip to content

Commit 1efae1d

Browse files
committed
[po] auto sync bot
1 parent 0819714 commit 1efae1d

3 files changed

Lines changed: 38 additions & 22 deletions

File tree

howto/functional.po

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# Fei Yin <[email protected]>, 2018
99
# Zephyr Waitzman <[email protected]>, 2018
1010
# Kder <[email protected]>, 2018
11-
# Freesand Leo <[email protected]>, 2019
1211
# chen_chao <[email protected]>, 2019
12+
# Freesand Leo <[email protected]>, 2019
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818
"Report-Msgid-Bugs-To: \n"
1919
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
2020
"PO-Revision-Date: 2017-02-16 17:44+0000\n"
21-
"Last-Translator: chen_chao <wenbushi@gmail.com>, 2019\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
2222
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -371,7 +371,7 @@ msgid ""
371371
msgstr ""
372372
"内置的 :func:`iter` 函数接受任意对象并试图返回一个迭代器来输出对象的内容或元素,并会在对象不支持迭代的时候抛出 "
373373
":exc:`TypeError` 异常。Python 有几种内置数据类型支持迭代,最常见的就是列表和字典。如果一个对象能生成迭代器,那么它就会被称作 "
374-
":term:`可迭代的`(:term:`iterable`。"
374+
":term:`iterable`。"
375375

376376
#: ../../howto/functional.rst:199
377377
msgid "You can experiment with the iteration interface manually:"
@@ -523,8 +523,9 @@ msgid ""
523523
" infinite stream or a very large amount of data. Generator expressions are "
524524
"preferable in these situations."
525525
msgstr ""
526-
"通过列表推导式,你会获得一个 Python "
527-
"列表;``stripped_list``就是一个包含所有结果行的列表,并不是迭代器。生成器表达时会返回一个迭代器,它在必要的时候计算结果,避免一次性生成所有的值。这意味着,如果迭代器返回一个无限数据流或者大量的数据,列表推导式就不太好用了。这中情况下生成器表达式会更受青睐。"
526+
"通过列表推导式,你会获得一个 Python 列表;``stripped_list`` 就是一个包含所有结果行的列表,并不是迭代器。 "
527+
"生成器表达式会返回一个迭代器,它在必要的时候计算结果,避免一次性生成所有的值。 "
528+
"这意味着,如果迭代器返回一个无限数据流或者大量的数据,列表推导式就不太好用了。 这种情况下生成器表达式会更受青睐。"
528529

529530
#: ../../howto/functional.rst:359
530531
msgid ""
@@ -631,8 +632,8 @@ msgid ""
631632
"this is detected by Python's :term:`bytecode` compiler which compiles the "
632633
"function specially as a result."
633634
msgstr ""
634-
"任何包含了 :keyword:`yield` 关键词的函数都是生成器函数;Python 的 "
635-
":term:`bytecode`编译器会在编译的时候检测到并因此而特殊处理。"
635+
"任何包含了 :keyword:`yield` 关键字的函数都是生成器函数;Python 的 :term:`bytecode` "
636+
"编译器会在编译的时候检测到并因此而特殊处理。"
636637

637638
#: ../../howto/functional.rst:456
638639
msgid ""
@@ -880,7 +881,7 @@ msgid ""
880881
"must take a single value."
881882
msgstr ""
882883
":func:`filter(predicate, iter) <filter>` 返回一个遍历序列中满足指定条件的元素的迭代器,和列表推导式的功能相似。"
883-
" **predicate** (谓词)是一个在特定条件下返回真值的函数;要使用函数:func:`filter`,谓词函数必须只能接受一个参数。"
884+
" **predicate** (谓词)是一个在特定条件下返回真值的函数;要使用函数 :func:`filter`,谓词函数必须只能接受一个参数。"
884885

885886
#: ../../howto/functional.rst:651
886887
msgid "This can also be written as a list comprehension:"

library/ast.po

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +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
# Jarry Shaw <[email protected]>, 2018
88
# Freesand Leo <[email protected]>, 2018
9+
# thautwarm <[email protected]>, 2019
910
#
1011
#, fuzzy
1112
msgid ""
1213
msgstr ""
1314
"Project-Id-Version: Python 3.7\n"
1415
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2018-10-29 09:36+0900\n"
16+
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1617
"PO-Revision-Date: 2017-02-16 17:48+0000\n"
17-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2018\n"
18+
"Last-Translator: thautwarm <twshere@outlook.com>, 2019\n"
1819
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1920
"MIME-Version: 1.0\n"
2021
"Content-Type: text/plain; charset=UTF-8\n"
@@ -77,19 +78,24 @@ msgid ""
7778
" rules with alternatives (aka \"sums\"), the left-hand side class is "
7879
"abstract: only instances of specific constructor nodes are ever created."
7980
msgstr ""
81+
"抽象语法定义的每个左侧符号(比方说, :class:`ast.stmt` 或者 "
82+
":class:`ast.expr`)定义了一个类。另外,在抽象语法定义的右侧,对每一个构造器也定义了一个类;这些类继承自树左侧的类。比如,:class:`ast.BinOp`"
83+
" 继承自 :class:`ast.expr`。对于多分支产生式(也就是\"和规则\"),树右侧的类是抽象的;只有特定构造器结点的实例能被构造。"
8084

8185
#: ../../library/ast.rst:49
8286
msgid ""
8387
"Each concrete class has an attribute :attr:`_fields` which gives the names "
8488
"of all child nodes."
85-
msgstr ""
89+
msgstr "每个具体类都有个属性 :attr:`_fields`, 用来给出所有子节点的名字。 "
8690

8791
#: ../../library/ast.rst:52
8892
msgid ""
8993
"Each instance of a concrete class has one attribute for each child node, of "
9094
"the type as defined in the grammar. For example, :class:`ast.BinOp` "
9195
"instances have an attribute :attr:`left` of type :class:`ast.expr`."
9296
msgstr ""
97+
"每个具体类的实例对它每个子节点都有一个属性,对应类型如文法中所定义。比如,:class:`ast.BinOp` 的实例有个属性 "
98+
":attr:`left`,类型是 :class:`ast.expr`."
9399

94100
#: ../../library/ast.rst:56
95101
msgid ""
@@ -99,6 +105,9 @@ msgid ""
99105
"lists. All possible attributes must be present and have valid values when "
100106
"compiling an AST with :func:`compile`."
101107
msgstr ""
108+
"如果这些属性在文法中标记为可选(使用问号),对应值可能会是 "
109+
"``None``。如果这些属性有零或多个(用星号标记),对应值会用Python的列表来表示。所有可能的属性必须在用 :func:`compile` "
110+
"编译得到AST时给出,且是有效的值。"
102111

103112
#: ../../library/ast.rst:65
104113
msgid ""
@@ -109,64 +118,68 @@ msgid ""
109118
"generated the node. The UTF-8 offset is recorded because the parser uses "
110119
"UTF-8 internally."
111120
msgstr ""
121+
":class:`ast.expr` 和 :class:`ast.stmt` 子类的实例有 :attr:`lineno` 和 "
122+
":attr:`col_offset` 属性。:attr:`lineno` 是源代码的行数(从1开始, 所以第一行行数是1),而 "
123+
":attr:`col_offset` 是该生成节点第一个token的UTF-8字节偏移量。记录下UTF-8偏移量的原因是parser内部使用UTF-8。"
112124

113125
#: ../../library/ast.rst:72
114126
msgid ""
115127
"The constructor of a class :class:`ast.T` parses its arguments as follows:"
116-
msgstr ""
128+
msgstr "一个类的构造器 :class:`ast.T` 像下面这样parse它的参数。"
117129

118130
#: ../../library/ast.rst:74
119131
msgid ""
120132
"If there are positional arguments, there must be as many as there are items "
121133
"in :attr:`T._fields`; they will be assigned as attributes of these names."
122-
msgstr ""
134+
msgstr "如果有位置参数,它们必须和 :attr:`T._fields` 中的元素一样多;他们会像这些名字的属性一样被赋值。"
123135

124136
#: ../../library/ast.rst:76
125137
msgid ""
126138
"If there are keyword arguments, they will set the attributes of the same "
127139
"names to the given values."
128-
msgstr ""
140+
msgstr "如果有关键字参数,它们必须被设为和给定值同名的属性。"
129141

130142
#: ../../library/ast.rst:79
131143
msgid ""
132144
"For example, to create and populate an :class:`ast.UnaryOp` node, you could "
133145
"use ::"
134-
msgstr ""
146+
msgstr "比方说,要创建和填充节点 :class:`ast.UnaryOp`,你得用 ::"
135147

136148
#: ../../library/ast.rst:91
137149
msgid "or the more compact ::"
138-
msgstr ""
150+
msgstr "或者更紧凑点 ::"
139151

140152
#: ../../library/ast.rst:100
141153
msgid "Abstract Grammar"
142-
msgstr ""
154+
msgstr "抽象文法"
143155

144156
#: ../../library/ast.rst:102
145157
msgid "The abstract grammar is currently defined as follows:"
146-
msgstr ""
158+
msgstr "抽象文法目前定义如下"
147159

148160
#: ../../library/ast.rst:109
149161
msgid ":mod:`ast` Helpers"
150-
msgstr ""
162+
msgstr ":mod:`ast` 中的辅助函数"
151163

152164
#: ../../library/ast.rst:111
153165
msgid ""
154166
"Apart from the node classes, the :mod:`ast` module defines these utility "
155167
"functions and classes for traversing abstract syntax trees:"
156-
msgstr ""
168+
msgstr "除了节点类, :mod:`ast` 模块里为遍历抽象语法树定义了这些工具函数和类:"
157169

158170
#: ../../library/ast.rst:116
159171
msgid ""
160172
"Parse the source into an AST node. Equivalent to ``compile(source, "
161173
"filename, mode, ast.PyCF_ONLY_AST)``."
162174
msgstr ""
175+
"把源码解析为AST节点。和 ``compile(source, filename, mode,ast.PyCF_ONLY_AST)`` 等价。"
163176

164177
#: ../../library/ast.rst:120 ../../library/ast.rst:138
165178
msgid ""
166179
"It is possible to crash the Python interpreter with a sufficiently "
167180
"large/complex string due to stack depth limitations in Python's AST "
168181
"compiler."
169-
msgstr ""
182+
msgstr "足够复杂或是巨大的字符串可能导致Python解释器的崩溃,因为Python的AST编译器是有栈深限制的。"
170183

171184
#: ../../library/ast.rst:127
172185
msgid ""

using/cmdline.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,8 @@ msgid ""
733733
":data:`os.pathsep` (e.g. colons on Unix or semicolons on Windows). Non-"
734734
"existent directories are silently ignored."
735735
msgstr ""
736+
"增加模块文件默认搜索路径。 所用格式与终端的 :envvar:`PATH` 相同:一个或多个由 :data:`os.pathsep` "
737+
"分隔的目录路径名称(例如 Unix 上用冒号而在 Windows 上用分号)。 不存在的目录会被静默忽略。"
736738

737739
#: ../../using/cmdline.rst:505
738740
msgid ""

0 commit comments

Comments
 (0)