8
8
msgstr ""
9
9
"Project-Id-Version :Python 2.7\n "
10
10
"Report-Msgid-Bugs-To :\n "
11
- "POT-Creation-Date :2019-01-01 15:21 +0900\n "
12
- "PO-Revision-Date :2019-09-01 05:18 +0000\n "
11
+ "POT-Creation-Date :2019-10-18 17:50 +0900\n "
12
+ "PO-Revision-Date :2019-10-18 09:03 +0000\n "
13
13
"Last-Translator :tomo\n "
14
14
"Language-Team :Japanese (http://www.transifex.com/python-doc/python-27/language/ja/)\n "
15
15
"MIME-Version :1.0\n "
@@ -171,31 +171,38 @@ msgid ""
171
171
"filename, mode, ast.PyCF_ONLY_AST)``."
172
172
msgstr "*source* を解析して AST ノードにします。``compile(source, filename, mode, ast.PyCF_ONLY_AST)`` と等価です。"
173
173
174
- #: ../../library/ast.rst:135
174
+ #: ../../library/ast.rst:133 ../../library/ast.rst:151
175
+ msgid ""
176
+ "It is possible to crash the Python interpreter with a sufficiently "
177
+ "large/complex string due to stack depth limitations in Python's AST "
178
+ "compiler."
179
+ msgstr "十分に大きい文字列や複雑な文字列によって Python の抽象構文木コンパイラのスタックの深さの限界を越えることで、 Python インタプリタをクラッシュさせることができます。"
180
+
181
+ #: ../../library/ast.rst:140
175
182
msgid ""
176
183
"Safely evaluate an expression node or a Unicode or *Latin-1* encoded string "
177
184
"containing a Python literal or container display. The string or node "
178
185
"provided may only consist of the following Python literal structures: "
179
186
"strings, numbers, tuples, lists, dicts, booleans, and ``None``."
180
187
msgstr "式ノード、または Python の式を表す Unicode または *Latin-1* エンコード文字列、コンテナのディスプレイ表現を表す文字列、を安全に評価します。与えられる文字列またはノードは次のリテラルのみからなるものに限られます: 文字列, 数, タプル, リスト, 辞書, ブール値, ``None`` 。"
181
188
182
- #: ../../library/ast.rst:140
189
+ #: ../../library/ast.rst:145
183
190
msgid ""
184
191
"This can be used for safely evaluating strings containing Python values from"
185
192
" untrusted sources without the need to parse the values oneself. It is not "
186
193
"capable of evaluating arbitrarily complex expressions, for example involving"
187
194
" operators or indexing."
188
195
msgstr "この関数は Python の式を含んだ信頼出来ない出どころからの文字列を、値自身を解析することなしに安全に評価するのに使えます。この関数は、例えば演算や添え字を含んだ任意の複雑な表現を評価するのには使えません。"
189
196
190
- #: ../../library/ast.rst:148
197
+ #: ../../library/ast.rst:158
191
198
msgid ""
192
199
"Return the docstring of the given *node* (which must be a "
193
200
":class:`FunctionDef`, :class:`ClassDef` or :class:`Module` node), or "
194
201
"``None`` if it has no docstring. If *clean* is true, clean up the "
195
202
"docstring's indentation with :func:`inspect.cleandoc`."
196
203
msgstr "与えられた *node* (これは :class:`FunctionDef`, :class:`ClassDef`, :class:`Module` のいずれかのノードでなければなりません) のドキュメント文字列を返します。もしドキュメント文字列が無ければ ``None`` を返します。 *clean* が真ならば、ドキュメント文字列のインデントを :func:`inspect.cleandoc` を用いて一掃します。"
197
204
198
- #: ../../library/ast.rst:156
205
+ #: ../../library/ast.rst:166
199
206
msgid ""
200
207
"When you compile a node tree with :func:`compile`, the compiler expects "
201
208
":attr:`lineno` and :attr:`col_offset` attributes for every node that "
@@ -205,82 +212,82 @@ msgid ""
205
212
"starting at *node*."
206
213
msgstr ":func:`compile` はノード・ツリーをコンパイルする際、 :attr:`lineno` と :attr:`col_offset` 両属性をサポートする全てのノードに対しそれが存在するものと想定します。生成されたノードに対しこれらを埋めて回るのはどちらかというと退屈な作業なので、このヘルパーが再帰的に二つの属性がセットされていないものに親ノードと同じ値をセットしていきます。再帰の出発点が *node* です。"
207
214
208
- #: ../../library/ast.rst:165
215
+ #: ../../library/ast.rst:175
209
216
msgid ""
210
217
"Increment the line number of each node in the tree starting at *node* by "
211
218
"*n*. This is useful to\" move code\" to a different location in a file."
212
219
msgstr "*node* から始まるツリーの全てのノードの行番号を *n* ずつ増やします。これはファイルの中で別の場所に「コードを動かす」ときに便利です。"
213
220
214
- #: ../../library/ast.rst:171
221
+ #: ../../library/ast.rst:181
215
222
msgid ""
216
223
"Copy source location (:attr:`lineno` and :attr:`col_offset`) from *old_node*"
217
224
" to *new_node* if possible, and return *new_node*."
218
225
msgstr "ソースの場所 (:attr:`lineno` と :attr:`col_offset`) を *old_node* から *new_node* に可能ならばコピーし、 *new_node* を返します。"
219
226
220
- #: ../../library/ast.rst:177
227
+ #: ../../library/ast.rst:187
221
228
msgid ""
222
229
"Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` "
223
230
"that is present on *node*."
224
231
msgstr "*node* にある ``node._fields`` のそれぞれのフィールドを ``(フィールド名, 値)`` のタプルとして yield します。"
225
232
226
- #: ../../library/ast.rst:183
233
+ #: ../../library/ast.rst:193
227
234
msgid ""
228
235
"Yield all direct child nodes of *node*, that is, all fields that are nodes "
229
236
"and all items of fields that are lists of nodes."
230
237
msgstr "*node* の直接の子ノード全てを yield します。すなわち、yield されるのは、ノードであるような全てのフィールドおよびノードのリストであるようなフィールドの全てのアイテムです。"
231
238
232
- #: ../../library/ast.rst:189
239
+ #: ../../library/ast.rst:199
233
240
msgid ""
234
241
"Recursively yield all descendant nodes in the tree starting at *node* "
235
242
"(including *node* itself), in no specified order. This is useful if you "
236
243
"only want to modify nodes in place and don't care about the context."
237
244
msgstr "*node* の全ての子孫ノード(*node* 自体を含む)を再帰的に yield します。順番は決められていません。この関数はノードをその場で変更するだけで文脈を気にしないような場合に便利です。"
238
245
239
- #: ../../library/ast.rst:196
246
+ #: ../../library/ast.rst:206
240
247
msgid ""
241
248
"A node visitor base class that walks the abstract syntax tree and calls a "
242
249
"visitor function for every node found. This function may return a value "
243
250
"which is forwarded by the :meth:`visit` method."
244
251
msgstr "抽象構文木を渡り歩いてビジター関数を見つけたノードごとに呼び出すノード・ビジターの基底クラスです。この関数は :meth:`visit` メソッドに送られる値を返してもかまいません。"
245
252
246
- #: ../../library/ast.rst:200
253
+ #: ../../library/ast.rst:210
247
254
msgid ""
248
255
"This class is meant to be subclassed, with the subclass adding visitor "
249
256
"methods."
250
257
msgstr "このクラスはビジター・メソッドを付け加えたサブクラスを派生させることを意図しています。"
251
258
252
- #: ../../library/ast.rst:205
259
+ #: ../../library/ast.rst:215
253
260
msgid ""
254
261
"Visit a node. The default implementation calls the method called "
255
262
":samp:`self.visit_{classname}` where *classname* is the name of the node "
256
263
"class, or :meth:`generic_visit` if that method doesn't exist."
257
264
msgstr "ノードを訪れます。デフォルトの実装では :samp:`self.visit_{classname}` というメソッド (ここで *classname* はノードのクラス名です) を呼び出すか、そのメソッドがなければ :meth:`generic_visit` を呼び出します。"
258
265
259
- #: ../../library/ast.rst:211
266
+ #: ../../library/ast.rst:221
260
267
msgid "This visitor calls :meth:`visit` on all children of the node."
261
268
msgstr "このビジターはノードの全ての子について :meth:`visit` を呼び出します。"
262
269
263
- #: ../../library/ast.rst:213
270
+ #: ../../library/ast.rst:223
264
271
msgid ""
265
272
"Note that child nodes of nodes that have a custom visitor method won't be "
266
273
"visited unless the visitor calls :meth:`generic_visit` or visits them "
267
274
"itself."
268
275
msgstr "注意して欲しいのは、専用のビジター・メソッドを具えたノードの子ノードは、このビジターが :meth:`generic_visit` を呼び出すかそれ自身で子ノードを訪れない限り訪れられないということです。"
269
276
270
- #: ../../library/ast.rst:217
277
+ #: ../../library/ast.rst:227
271
278
msgid ""
272
279
"Don't use the :class:`NodeVisitor` if you want to apply changes to nodes "
273
280
"during traversal. For this a special visitor exists "
274
281
"(:class:`NodeTransformer`) that allows modifications."
275
282
msgstr "トラバースの途中でノードを変化させたいならば :class:`NodeVisitor` を使ってはいけません。そうした目的のために変更を許す特別なビジター (:class:`NodeTransformer`) があります。"
276
283
277
- #: ../../library/ast.rst:224
284
+ #: ../../library/ast.rst:234
278
285
msgid ""
279
286
"A :class:`NodeVisitor` subclass that walks the abstract syntax tree and "
280
287
"allows modification of nodes."
281
288
msgstr ":class:`NodeVisitor` のサブクラスで抽象構文木を渡り歩きながらノードを変更することを許すものです。"
282
289
283
- #: ../../library/ast.rst:227
290
+ #: ../../library/ast.rst:237
284
291
msgid ""
285
292
"The :class:`NodeTransformer` will walk the AST and use the return value of "
286
293
"the visitor methods to replace or remove the old node. If the return value "
@@ -289,31 +296,31 @@ msgid ""
289
296
"may be the original node in which case no replacement takes place."
290
297
msgstr ":class:`NodeTransformer` は抽象構文木(AST)を渡り歩き、ビジター・メソッドの戻り値を使って古いノードを置き換えたり削除したりします。ビジター・メソッドの戻り値が ``None`` ならば、ノードはその場から取り去られ、そうでなければ戻り値で置き換えられます。置き換えない場合は戻り値が元のノードそのものであってもかまいません。"
291
298
292
- #: ../../library/ast.rst:233
299
+ #: ../../library/ast.rst:243
293
300
msgid ""
294
301
"Here is an example transformer that rewrites all occurrences of name lookups"
295
302
" (``foo``) to ``data['foo']``::"
296
303
msgstr "それでは例を示しましょう。Name (たとえば ``foo``) を見つけるたび全て ``data['foo']`` に書き換える変換器 (transformer) です::"
297
304
298
- #: ../../library/ast.rst:245
305
+ #: ../../library/ast.rst:255
299
306
msgid ""
300
307
"Keep in mind that if the node you're operating on has child nodes you must "
301
308
"either transform the child nodes yourself or call the :meth:`generic_visit` "
302
309
"method for the node first."
303
310
msgstr "操作しようとしているノードが子ノードを持つならば、その子ノードの変形も自分で行うか、またはそのノードに対し最初に :meth:`generic_visit` メソッドを呼び出すか、それを行うのはあなたの責任だということを肝に銘じましょう。"
304
311
305
- #: ../../library/ast.rst:249
312
+ #: ../../library/ast.rst:259
306
313
msgid ""
307
314
"For nodes that were part of a collection of statements (that applies to all "
308
315
"statement nodes), the visitor may also return a list of nodes rather than "
309
316
"just a single node."
310
317
msgstr "文のコレクションであるようなノード (全ての文のノードが当てはまります) に対して、このビジターは単独のノードではなくノードのリストを返すかもしれません。"
311
318
312
- #: ../../library/ast.rst:253
319
+ #: ../../library/ast.rst:263
313
320
msgid "Usually you use the transformer like this::"
314
321
msgstr "たいてい、変換器の使い方は次のようになります::"
315
322
316
- #: ../../library/ast.rst:260
323
+ #: ../../library/ast.rst:270
317
324
msgid ""
318
325
"Return a formatted dump of the tree in *node*. This is mainly useful for "
319
326
"debugging purposes. The returned string will show the names and the values "