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

Skip to content

Commit 1c9210c

Browse files
committed
[po] auto sync bot
1 parent cb81a11 commit 1c9210c

2 files changed

Lines changed: 61 additions & 50 deletions

File tree

library/abc.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Translators:
77
# Jerry Chen <[email protected]>, 2017
88
# cissoid <[email protected]>, 2018
9-
# Freesand Leo <[email protected]>, 2018
109
# Jarry Shaw <[email protected]>, 2018
10+
# Freesand Leo <[email protected]>, 2018
1111
#
1212
#, fuzzy
1313
msgid ""
@@ -16,7 +16,7 @@ msgstr ""
1616
"Report-Msgid-Bugs-To: \n"
1717
"POT-Creation-Date: 2018-11-15 09:44+0900\n"
1818
"PO-Revision-Date: 2017-02-16 17:47+0000\n"
19-
"Last-Translator: Jarry Shaw <jarryshaw@icloud.com>, 2018\n"
19+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2018\n"
2020
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2121
"MIME-Version: 1.0\n"
2222
"Content-Type: text/plain; charset=UTF-8\n"
@@ -204,9 +204,9 @@ msgid ""
204204
" of the normal 'super' call mechanisms. :func:`abstractmethod` may be used "
205205
"to declare abstract methods for properties and descriptors."
206206
msgstr ""
207-
"使用该装饰器时,要求其作用函数的所属类的元类是 :class:`ABCMeta` 或派生自 :class:`ABCMeta`。对于一个派生自 "
208-
":class:`ABCMeta` 的类,当且仅当其所有抽象方法和抽象特征属性均已被重载时,才能够实例化。抽象方法可使用 'super' "
209-
"函数机制调用。:func:`abstractmethod` 可被用于声明特征属性和描述器的抽象方法。"
207+
"使用此装饰器要求类的元类是 :class:`ABCMeta` 或是从该类派生。一个具有派生自 :class:`ABCMeta` "
208+
"的元类的类不可以被实例化,除非它全部的抽象方法和特征属性均已被重载。抽象方法可通过任何普通的“super”调用机制来调用。 "
209+
":func:`abstractmethod` 可被用于声明特性属性和描述器的抽象方法。"
210210

211211
#: ../../library/abc.rst:176
212212
msgid ""

library/ast.po

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6+
# Translators:
7+
# Jarry Shaw <[email protected]>, 2018
8+
#
69
#, fuzzy
710
msgid ""
811
msgstr ""
912
"Project-Id-Version: Python 3.7\n"
1013
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"POT-Creation-Date: 2018-10-29 09:36+0900\n"
15+
"PO-Revision-Date: 2017-02-16 17:48+0000\n"
16+
"Last-Translator: Jarry Shaw <[email protected]>, 2018\n"
1317
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1418
"MIME-Version: 1.0\n"
1519
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,11 +23,11 @@ msgstr ""
1923

2024
#: ../../library/ast.rst:2
2125
msgid ":mod:`ast` --- Abstract Syntax Trees"
22-
msgstr ""
26+
msgstr ":mod:`ast` --- 抽象语法树"
2327

2428
#: ../../library/ast.rst:10
2529
msgid "**Source code:** :source:`Lib/ast.py`"
26-
msgstr ""
30+
msgstr "**源代码:** :source:`Lib/ast.py`"
2731

2832
#: ../../library/ast.rst:14
2933
msgid ""
@@ -32,6 +36,8 @@ msgid ""
3236
"with each Python release; this module helps to find out programmatically "
3337
"what the current grammar looks like."
3438
msgstr ""
39+
":mod:`ast` 模块帮助 Python 程序处理 Python 语法的抽象语法树。抽象语法或许会随着 Python "
40+
"的更新发布而改变;该模块能够帮助理解当前语法在编程层面的样貌。"
3541

3642
#: ../../library/ast.rst:19
3743
msgid ""
@@ -42,10 +48,13 @@ msgid ""
4248
":class:`ast.AST`. An abstract syntax tree can be compiled into a Python "
4349
"code object using the built-in :func:`compile` function."
4450
msgstr ""
51+
"抽象语法树可通过向 :func:`compile: 内置函数传递 :data:`ast.PyCF_ONLY_AST` 参数获取,或使用该模块中提供的 "
52+
":func:`parse` 函数。其返回结果将是一个对象树,其中所有对象均继承自 :class:`ast.AST` 类。抽象语法树可被 "
53+
":func:`compile: 内置函数编译为 Python 代码对象。"
4554

4655
#: ../../library/ast.rst:27
4756
msgid "Node classes"
48-
msgstr ""
57+
msgstr "节点类"
4958

5059
#: ../../library/ast.rst:31
5160
msgid ""
@@ -54,6 +63,8 @@ msgid ""
5463
":ref:`below <abstract-grammar>`. They are defined in the :mod:`_ast` C "
5564
"module and re-exported in :mod:`ast`."
5665
msgstr ""
66+
"这是所有 AST 节点类的基类。实际上,这些节点类派生自:ref:`如下 <abstract-grammar>`释例的 "
67+
":file:`Parser/Python.asdl` 文件。它们在 C 语言模块 :mod:`_ast` 定义,并被导出至 :mod:`ast` 模块。"
5768

5869
#: ../../library/ast.rst:36
5970
msgid ""
@@ -66,20 +77,20 @@ msgid ""
6677
"abstract: only instances of specific constructor nodes are ever created."
6778
msgstr ""
6879

69-
#: ../../library/ast.rst:46
80+
#: ../../library/ast.rst:49
7081
msgid ""
7182
"Each concrete class has an attribute :attr:`_fields` which gives the names "
7283
"of all child nodes."
7384
msgstr ""
7485

75-
#: ../../library/ast.rst:49
86+
#: ../../library/ast.rst:52
7687
msgid ""
7788
"Each instance of a concrete class has one attribute for each child node, of "
7889
"the type as defined in the grammar. For example, :class:`ast.BinOp` "
7990
"instances have an attribute :attr:`left` of type :class:`ast.expr`."
8091
msgstr ""
8192

82-
#: ../../library/ast.rst:53
93+
#: ../../library/ast.rst:56
8394
msgid ""
8495
"If these attributes are marked as optional in the grammar (using a question "
8596
"mark), the value might be ``None``. If the attributes can have zero-or-more"
@@ -88,7 +99,7 @@ msgid ""
8899
"compiling an AST with :func:`compile`."
89100
msgstr ""
90101

91-
#: ../../library/ast.rst:62
102+
#: ../../library/ast.rst:65
92103
msgid ""
93104
"Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have "
94105
":attr:`lineno` and :attr:`col_offset` attributes. The :attr:`lineno` is the"
@@ -98,97 +109,97 @@ msgid ""
98109
"UTF-8 internally."
99110
msgstr ""
100111

101-
#: ../../library/ast.rst:69
112+
#: ../../library/ast.rst:72
102113
msgid ""
103114
"The constructor of a class :class:`ast.T` parses its arguments as follows:"
104115
msgstr ""
105116

106-
#: ../../library/ast.rst:71
117+
#: ../../library/ast.rst:74
107118
msgid ""
108119
"If there are positional arguments, there must be as many as there are items "
109120
"in :attr:`T._fields`; they will be assigned as attributes of these names."
110121
msgstr ""
111122

112-
#: ../../library/ast.rst:73
123+
#: ../../library/ast.rst:76
113124
msgid ""
114125
"If there are keyword arguments, they will set the attributes of the same "
115126
"names to the given values."
116127
msgstr ""
117128

118-
#: ../../library/ast.rst:76
129+
#: ../../library/ast.rst:79
119130
msgid ""
120131
"For example, to create and populate an :class:`ast.UnaryOp` node, you could "
121132
"use ::"
122133
msgstr ""
123134

124-
#: ../../library/ast.rst:88
135+
#: ../../library/ast.rst:91
125136
msgid "or the more compact ::"
126137
msgstr ""
127138

128-
#: ../../library/ast.rst:97
139+
#: ../../library/ast.rst:100
129140
msgid "Abstract Grammar"
130141
msgstr ""
131142

132-
#: ../../library/ast.rst:99
143+
#: ../../library/ast.rst:102
133144
msgid "The abstract grammar is currently defined as follows:"
134145
msgstr ""
135146

136-
#: ../../library/ast.rst:106
147+
#: ../../library/ast.rst:109
137148
msgid ":mod:`ast` Helpers"
138149
msgstr ""
139150

140-
#: ../../library/ast.rst:108
151+
#: ../../library/ast.rst:111
141152
msgid ""
142153
"Apart from the node classes, the :mod:`ast` module defines these utility "
143154
"functions and classes for traversing abstract syntax trees:"
144155
msgstr ""
145156

146-
#: ../../library/ast.rst:113
157+
#: ../../library/ast.rst:116
147158
msgid ""
148159
"Parse the source into an AST node. Equivalent to ``compile(source, "
149160
"filename, mode, ast.PyCF_ONLY_AST)``."
150161
msgstr ""
151162

152-
#: ../../library/ast.rst:117 ../../library/ast.rst:135
163+
#: ../../library/ast.rst:120 ../../library/ast.rst:138
153164
msgid ""
154165
"It is possible to crash the Python interpreter with a sufficiently "
155166
"large/complex string due to stack depth limitations in Python's AST "
156167
"compiler."
157168
msgstr ""
158169

159-
#: ../../library/ast.rst:124
170+
#: ../../library/ast.rst:127
160171
msgid ""
161172
"Safely evaluate an expression node or a string containing a Python literal "
162173
"or container display. The string or node provided may only consist of the "
163174
"following Python literal structures: strings, bytes, numbers, tuples, lists,"
164175
" dicts, sets, booleans, and ``None``."
165176
msgstr ""
166177

167-
#: ../../library/ast.rst:129
178+
#: ../../library/ast.rst:132
168179
msgid ""
169180
"This can be used for safely evaluating strings containing Python values from"
170181
" untrusted sources without the need to parse the values oneself. It is not "
171182
"capable of evaluating arbitrarily complex expressions, for example involving"
172183
" operators or indexing."
173184
msgstr ""
174185

175-
#: ../../library/ast.rst:139
186+
#: ../../library/ast.rst:142
176187
msgid "Now allows bytes and set literals."
177188
msgstr ""
178189

179-
#: ../../library/ast.rst:145
190+
#: ../../library/ast.rst:148
180191
msgid ""
181192
"Return the docstring of the given *node* (which must be a "
182193
":class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or "
183194
":class:`Module` node), or ``None`` if it has no docstring. If *clean* is "
184195
"true, clean up the docstring's indentation with :func:`inspect.cleandoc`."
185196
msgstr ""
186197

187-
#: ../../library/ast.rst:151
198+
#: ../../library/ast.rst:154
188199
msgid ":class:`AsyncFunctionDef` is now supported."
189200
msgstr ""
190201

191-
#: ../../library/ast.rst:157
202+
#: ../../library/ast.rst:160
192203
msgid ""
193204
"When you compile a node tree with :func:`compile`, the compiler expects "
194205
":attr:`lineno` and :attr:`col_offset` attributes for every node that "
@@ -198,82 +209,82 @@ msgid ""
198209
"starting at *node*."
199210
msgstr ""
200211

201-
#: ../../library/ast.rst:166
212+
#: ../../library/ast.rst:169
202213
msgid ""
203214
"Increment the line number of each node in the tree starting at *node* by "
204215
"*n*. This is useful to \"move code\" to a different location in a file."
205216
msgstr ""
206217

207-
#: ../../library/ast.rst:172
218+
#: ../../library/ast.rst:175
208219
msgid ""
209220
"Copy source location (:attr:`lineno` and :attr:`col_offset`) from *old_node*"
210221
" to *new_node* if possible, and return *new_node*."
211222
msgstr ""
212223

213-
#: ../../library/ast.rst:178
224+
#: ../../library/ast.rst:181
214225
msgid ""
215226
"Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` "
216227
"that is present on *node*."
217228
msgstr ""
218229

219-
#: ../../library/ast.rst:184
230+
#: ../../library/ast.rst:187
220231
msgid ""
221232
"Yield all direct child nodes of *node*, that is, all fields that are nodes "
222233
"and all items of fields that are lists of nodes."
223234
msgstr ""
224235

225-
#: ../../library/ast.rst:190
236+
#: ../../library/ast.rst:193
226237
msgid ""
227238
"Recursively yield all descendant nodes in the tree starting at *node* "
228239
"(including *node* itself), in no specified order. This is useful if you "
229240
"only want to modify nodes in place and don't care about the context."
230241
msgstr ""
231242

232-
#: ../../library/ast.rst:197
243+
#: ../../library/ast.rst:200
233244
msgid ""
234245
"A node visitor base class that walks the abstract syntax tree and calls a "
235246
"visitor function for every node found. This function may return a value "
236247
"which is forwarded by the :meth:`visit` method."
237248
msgstr ""
238249

239-
#: ../../library/ast.rst:201
250+
#: ../../library/ast.rst:204
240251
msgid ""
241252
"This class is meant to be subclassed, with the subclass adding visitor "
242253
"methods."
243254
msgstr ""
244255

245-
#: ../../library/ast.rst:206
256+
#: ../../library/ast.rst:209
246257
msgid ""
247258
"Visit a node. The default implementation calls the method called "
248259
":samp:`self.visit_{classname}` where *classname* is the name of the node "
249260
"class, or :meth:`generic_visit` if that method doesn't exist."
250261
msgstr ""
251262

252-
#: ../../library/ast.rst:212
263+
#: ../../library/ast.rst:215
253264
msgid "This visitor calls :meth:`visit` on all children of the node."
254265
msgstr ""
255266

256-
#: ../../library/ast.rst:214
267+
#: ../../library/ast.rst:217
257268
msgid ""
258269
"Note that child nodes of nodes that have a custom visitor method won't be "
259270
"visited unless the visitor calls :meth:`generic_visit` or visits them "
260271
"itself."
261272
msgstr ""
262273

263-
#: ../../library/ast.rst:218
274+
#: ../../library/ast.rst:221
264275
msgid ""
265276
"Don't use the :class:`NodeVisitor` if you want to apply changes to nodes "
266277
"during traversal. For this a special visitor exists "
267278
"(:class:`NodeTransformer`) that allows modifications."
268279
msgstr ""
269280

270-
#: ../../library/ast.rst:225
281+
#: ../../library/ast.rst:228
271282
msgid ""
272283
"A :class:`NodeVisitor` subclass that walks the abstract syntax tree and "
273284
"allows modification of nodes."
274285
msgstr ""
275286

276-
#: ../../library/ast.rst:228
287+
#: ../../library/ast.rst:231
277288
msgid ""
278289
"The :class:`NodeTransformer` will walk the AST and use the return value of "
279290
"the visitor methods to replace or remove the old node. If the return value "
@@ -282,31 +293,31 @@ msgid ""
282293
"may be the original node in which case no replacement takes place."
283294
msgstr ""
284295

285-
#: ../../library/ast.rst:234
296+
#: ../../library/ast.rst:237
286297
msgid ""
287298
"Here is an example transformer that rewrites all occurrences of name lookups"
288299
" (``foo``) to ``data['foo']``::"
289300
msgstr ""
290301

291-
#: ../../library/ast.rst:246
302+
#: ../../library/ast.rst:249
292303
msgid ""
293304
"Keep in mind that if the node you're operating on has child nodes you must "
294305
"either transform the child nodes yourself or call the :meth:`generic_visit` "
295306
"method for the node first."
296307
msgstr ""
297308

298-
#: ../../library/ast.rst:250
309+
#: ../../library/ast.rst:253
299310
msgid ""
300311
"For nodes that were part of a collection of statements (that applies to all "
301312
"statement nodes), the visitor may also return a list of nodes rather than "
302313
"just a single node."
303314
msgstr ""
304315

305-
#: ../../library/ast.rst:254
316+
#: ../../library/ast.rst:257
306317
msgid "Usually you use the transformer like this::"
307318
msgstr ""
308319

309-
#: ../../library/ast.rst:261
320+
#: ../../library/ast.rst:264
310321
msgid ""
311322
"Return a formatted dump of the tree in *node*. This is mainly useful for "
312323
"debugging purposes. The returned string will show the names and the values "
@@ -316,7 +327,7 @@ msgid ""
316327
"*include_attributes* can be set to ``True``."
317328
msgstr ""
318329

319-
#: ../../library/ast.rst:270
330+
#: ../../library/ast.rst:273
320331
msgid ""
321332
"`Green Tree Snakes <https://greentreesnakes.readthedocs.io/>`_, an external "
322333
"documentation resource, has good details on working with Python ASTs."

0 commit comments

Comments
 (0)