@@ -15,7 +15,7 @@ msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version :Python 3.8\n "
17
17
"Report-Msgid-Bugs-To :\n "
18
- "POT-Creation-Date :2020-02-09 12:40 +0000\n "
18
+ "POT-Creation-Date :2020-02-17 12:43 +0000\n "
19
19
"PO-Revision-Date :2017-02-16 17:48+0000\n "
20
20
"Last-Translator :Tetsuo Koyama <tkoyama010@gmail.com>, 2020\n "
21
21
"Language-Team :Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -168,41 +168,45 @@ msgid "or the more compact ::"
168
168
msgstr "もしくはよりコンパクトにも書けます ::"
169
169
170
170
#: ../../library/ast.rst:106
171
+ msgid "Class :class:`ast.Constant` is now used for all constants."
172
+ msgstr ""
173
+
174
+ #: ../../library/ast.rst:110
171
175
msgid ""
172
- "Class :class:`ast.Constant` is now used for all constants. Old classes "
173
- ":class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, "
176
+ "Old classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, "
174
177
":class:`ast.NameConstant` and :class:`ast.Ellipsis` are still available, but"
175
- " they will be removed in future Python releases."
178
+ " they will be removed in future Python releases. In the meanwhile, "
179
+ "instantiating them will return an instance of a different class."
176
180
msgstr ""
177
181
178
- #: ../../library/ast.rst:115
182
+ #: ../../library/ast.rst:119
179
183
msgid "Abstract Grammar"
180
184
msgstr "抽象文法 (Abstract Grammar)"
181
185
182
- #: ../../library/ast.rst:117
186
+ #: ../../library/ast.rst:121
183
187
msgid "The abstract grammar is currently defined as follows:"
184
188
msgstr "抽象文法は、現在次のように定義されています:"
185
189
186
- #: ../../library/ast.rst:124
190
+ #: ../../library/ast.rst:128
187
191
msgid ":mod:`ast` Helpers"
188
192
msgstr ":mod:`ast` ヘルパー"
189
193
190
- #: ../../library/ast.rst:126
194
+ #: ../../library/ast.rst:130
191
195
msgid ""
192
196
"Apart from the node classes, the :mod:`ast` module defines these utility "
193
197
"functions and classes for traversing abstract syntax trees:"
194
198
msgstr ""
195
199
"ノード・クラスの他に、 :mod:`ast` モジュールは以下のような抽象構文木をトラバースするためのユーティリティ関数やクラスも定義しています:"
196
200
197
- #: ../../library/ast.rst:131
201
+ #: ../../library/ast.rst:135
198
202
msgid ""
199
203
"Parse the source into an AST node. Equivalent to ``compile(source, "
200
204
"filename, mode, ast.PyCF_ONLY_AST)``."
201
205
msgstr ""
202
206
"*source* を解析して AST ノードにします。``compile(source, filename, mode, "
203
207
"ast.PyCF_ONLY_AST)`` と等価です。"
204
208
205
- #: ../../library/ast.rst:134
209
+ #: ../../library/ast.rst:138
206
210
msgid ""
207
211
"If ``type_comments=True`` is given, the parser is modified to check and "
208
212
"return type comments as specified by :pep:`484` and :pep:`526`. This is "
@@ -215,14 +219,14 @@ msgid ""
215
219
" empty list)."
216
220
msgstr ""
217
221
218
- #: ../../library/ast.rst:144
222
+ #: ../../library/ast.rst:148
219
223
msgid ""
220
224
"In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to"
221
225
" correspond to :pep:`484`\" signature type comments\" , e.g. ``(str, int) -> "
222
226
"List[str]``."
223
227
msgstr ""
224
228
225
- #: ../../library/ast.rst:148
229
+ #: ../../library/ast.rst:152
226
230
msgid ""
227
231
"Also, setting ``feature_version`` to a tuple ``(major, minor)`` will attempt"
228
232
" to parse using that Python version's grammar. Currently ``major`` must "
@@ -231,7 +235,7 @@ msgid ""
231
235
"version is ``(3, 4)``; the highest is ``sys.version_info[0:2]``."
232
236
msgstr ""
233
237
234
- #: ../../library/ast.rst:156 ../../library/ast.rst:177
238
+ #: ../../library/ast.rst:160 ../../library/ast.rst:181
235
239
msgid ""
236
240
"It is possible to crash the Python interpreter with a sufficiently "
237
241
"large/complex string due to stack depth limitations in Python's AST "
@@ -240,11 +244,11 @@ msgstr ""
240
244
"十分に大きい文字列や複雑な文字列によって Python の抽象構文木コンパイラのスタックの深さの限界を越えることで、 Python "
241
245
"インタプリタをクラッシュさせることができます。"
242
246
243
- #: ../../library/ast.rst:160
247
+ #: ../../library/ast.rst:164
244
248
msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``."
245
249
msgstr ""
246
250
247
- #: ../../library/ast.rst:166
251
+ #: ../../library/ast.rst:170
248
252
msgid ""
249
253
"Safely evaluate an expression node or a string containing a Python literal "
250
254
"or container display. The string or node provided may only consist of the "
@@ -255,7 +259,7 @@ msgstr ""
255
259
"のリテラルまたはコンテナのディスプレイ表現を表す文字列を安全に評価します。与えられる文字列またはノードは次のリテラルのみからなるものに限られます: "
256
260
"文字列、バイト列、数、タプル、リスト、辞書、集合、ブール値、 ``None`` 。"
257
261
258
- #: ../../library/ast.rst:171
262
+ #: ../../library/ast.rst:175
259
263
msgid ""
260
264
"This can be used for safely evaluating strings containing Python values from"
261
265
" untrusted sources without the need to parse the values oneself. It is not "
@@ -265,11 +269,11 @@ msgstr ""
265
269
"この関数は Python "
266
270
"の式を含んだ信頼出来ない出どころからの文字列を、値自身を解析することなしに安全に評価するのに使えます。この関数は、例えば演算や添え字を含んだ任意の複雑な表現を評価するのには使えません。"
267
271
268
- #: ../../library/ast.rst:181
272
+ #: ../../library/ast.rst:185
269
273
msgid "Now allows bytes and set literals."
270
274
msgstr "バイト列リテラルと集合リテラルが受け取れるようになりました。"
271
275
272
- #: ../../library/ast.rst:187
276
+ #: ../../library/ast.rst:191
273
277
msgid ""
274
278
"Return the docstring of the given *node* (which must be a "
275
279
":class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or "
@@ -281,24 +285,24 @@ msgstr ""
281
285
"のドキュメント文字列を返します。もしドキュメント文字列が無ければ ``None`` を返します。 *clean* "
282
286
"が真ならば、ドキュメント文字列のインデントを :func:`inspect.cleandoc` を用いて一掃します。"
283
287
284
- #: ../../library/ast.rst:193
288
+ #: ../../library/ast.rst:197
285
289
msgid ":class:`AsyncFunctionDef` is now supported."
286
290
msgstr ":class:`AsyncFunctionDef` がサポートされました。"
287
291
288
- #: ../../library/ast.rst:199
292
+ #: ../../library/ast.rst:203
289
293
msgid ""
290
294
"Get source code segment of the *source* that generated *node*. If some "
291
295
"location information (:attr:`lineno`, :attr:`end_lineno`, "
292
296
":attr:`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``."
293
297
msgstr ""
294
298
295
- #: ../../library/ast.rst:203
299
+ #: ../../library/ast.rst:207
296
300
msgid ""
297
301
"If *padded* is ``True``, the first line of a multi-line statement will be "
298
302
"padded with spaces to match its original position."
299
303
msgstr ""
300
304
301
- #: ../../library/ast.rst:211
305
+ #: ../../library/ast.rst:215
302
306
msgid ""
303
307
"When you compile a node tree with :func:`compile`, the compiler expects "
304
308
":attr:`lineno` and :attr:`col_offset` attributes for every node that "
@@ -311,36 +315,36 @@ msgstr ""
311
315
"両属性をサポートする全てのノードに対しそれが存在するものと想定します。生成されたノードに対しこれらを埋めて回るのはどちらかというと退屈な作業なので、このヘルパーが再帰的に二つの属性がセットされていないものに親ノードと同じ値をセットしていきます。再帰の出発点が"
312
316
" *node* です。"
313
317
314
- #: ../../library/ast.rst:220
318
+ #: ../../library/ast.rst:224
315
319
msgid ""
316
320
"Increment the line number and end line number of each node in the tree "
317
321
"starting at *node* by *n*. This is useful to\" move code\" to a different "
318
322
"location in a file."
319
323
msgstr ""
320
324
321
- #: ../../library/ast.rst:227
325
+ #: ../../library/ast.rst:231
322
326
msgid ""
323
327
"Copy source location (:attr:`lineno`, :attr:`col_offset`, "
324
328
":attr:`end_lineno`, and :attr:`end_col_offset`) from *old_node* to "
325
329
"*new_node* if possible, and return *new_node*."
326
330
msgstr ""
327
331
328
- #: ../../library/ast.rst:234
332
+ #: ../../library/ast.rst:238
329
333
msgid ""
330
334
"Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` "
331
335
"that is present on *node*."
332
336
msgstr ""
333
337
"*node* にある ``node._fields`` のそれぞれのフィールドを ``(フィールド名, 値)`` のタプルとして yield します。"
334
338
335
- #: ../../library/ast.rst:240
339
+ #: ../../library/ast.rst:244
336
340
msgid ""
337
341
"Yield all direct child nodes of *node*, that is, all fields that are nodes "
338
342
"and all items of fields that are lists of nodes."
339
343
msgstr ""
340
344
"*node* の直接の子ノード全てを yield します。すなわち、yield "
341
345
"されるのは、ノードであるような全てのフィールドおよびノードのリストであるようなフィールドの全てのアイテムです。"
342
346
343
- #: ../../library/ast.rst:246
347
+ #: ../../library/ast.rst:250
344
348
msgid ""
345
349
"Recursively yield all descendant nodes in the tree starting at *node* "
346
350
"(including *node* itself), in no specified order. This is useful if you "
@@ -349,7 +353,7 @@ msgstr ""
349
353
"*node* の全ての子孫ノード(*node* 自体を含む)を再帰的に yield "
350
354
"します。順番は決められていません。この関数はノードをその場で変更するだけで文脈を気にしないような場合に便利です。"
351
355
352
- #: ../../library/ast.rst:253
356
+ #: ../../library/ast.rst:257
353
357
msgid ""
354
358
"A node visitor base class that walks the abstract syntax tree and calls a "
355
359
"visitor function for every node found. This function may return a value "
@@ -358,13 +362,13 @@ msgstr ""
358
362
"抽象構文木を渡り歩いてビジター関数を見つけたノードごとに呼び出すノード・ビジターの基底クラスです。この関数は :meth:`visit` "
359
363
"メソッドに送られる値を返してもかまいません。"
360
364
361
- #: ../../library/ast.rst:257
365
+ #: ../../library/ast.rst:261
362
366
msgid ""
363
367
"This class is meant to be subclassed, with the subclass adding visitor "
364
368
"methods."
365
369
msgstr "このクラスはビジター・メソッドを付け加えたサブクラスを派生させることを意図しています。"
366
370
367
- #: ../../library/ast.rst:262
371
+ #: ../../library/ast.rst:266
368
372
msgid ""
369
373
"Visit a node. The default implementation calls the method called "
370
374
":samp:`self.visit_{classname}` where *classname* is the name of the node "
@@ -373,11 +377,11 @@ msgstr ""
373
377
"ノードを訪れます。デフォルトの実装では :samp:`self.visit_{classname}` というメソッド (ここで *classname* "
374
378
"はノードのクラス名です) を呼び出すか、そのメソッドがなければ :meth:`generic_visit` を呼び出します。"
375
379
376
- #: ../../library/ast.rst:268
380
+ #: ../../library/ast.rst:272
377
381
msgid "This visitor calls :meth:`visit` on all children of the node."
378
382
msgstr "このビジターはノードの全ての子について :meth:`visit` を呼び出します。"
379
383
380
- #: ../../library/ast.rst:270
384
+ #: ../../library/ast.rst:274
381
385
msgid ""
382
386
"Note that child nodes of nodes that have a custom visitor method won't be "
383
387
"visited unless the visitor calls :meth:`generic_visit` or visits them "
@@ -386,7 +390,7 @@ msgstr ""
386
390
"注意して欲しいのは、専用のビジター・メソッドを具えたノードの子ノードは、このビジターが :meth:`generic_visit` "
387
391
"を呼び出すかそれ自身で子ノードを訪れない限り訪れられないということです。"
388
392
389
- #: ../../library/ast.rst:274
393
+ #: ../../library/ast.rst:278
390
394
msgid ""
391
395
"Don't use the :class:`NodeVisitor` if you want to apply changes to nodes "
392
396
"during traversal. For this a special visitor exists "
@@ -395,21 +399,21 @@ msgstr ""
395
399
"トラバースの途中でノードを変化させたいならば :class:`NodeVisitor` "
396
400
"を使ってはいけません。そうした目的のために変更を許す特別なビジター (:class:`NodeTransformer`) があります。"
397
401
398
- #: ../../library/ast.rst:280
402
+ #: ../../library/ast.rst:284
399
403
msgid ""
400
404
"Methods :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, "
401
405
":meth:`visit_NameConstant` and :meth:`visit_Ellipsis` are deprecated now and"
402
406
" will not be called in future Python versions. Add the "
403
407
":meth:`visit_Constant` method to handle all constant nodes."
404
408
msgstr ""
405
409
406
- #: ../../library/ast.rst:288
410
+ #: ../../library/ast.rst:292
407
411
msgid ""
408
412
"A :class:`NodeVisitor` subclass that walks the abstract syntax tree and "
409
413
"allows modification of nodes."
410
414
msgstr ":class:`NodeVisitor` のサブクラスで抽象構文木を渡り歩きながらノードを変更することを許すものです。"
411
415
412
- #: ../../library/ast.rst:291
416
+ #: ../../library/ast.rst:295
413
417
msgid ""
414
418
"The :class:`NodeTransformer` will walk the AST and use the return value of "
415
419
"the visitor methods to replace or remove the old node. If the return value "
@@ -422,15 +426,15 @@ msgstr ""
422
426
"``None`` "
423
427
"ならば、ノードはその場から取り去られ、そうでなければ戻り値で置き換えられます。置き換えない場合は戻り値が元のノードそのものであってもかまいません。"
424
428
425
- #: ../../library/ast.rst:297
429
+ #: ../../library/ast.rst:301
426
430
msgid ""
427
431
"Here is an example transformer that rewrites all occurrences of name lookups"
428
432
" (``foo``) to ``data['foo']``::"
429
433
msgstr ""
430
434
"それでは例を示しましょう。Name (たとえば ``foo``) を見つけるたび全て ``data['foo']`` に書き換える変換器 "
431
435
"(transformer) です::"
432
436
433
- #: ../../library/ast.rst:309
437
+ #: ../../library/ast.rst:313
434
438
msgid ""
435
439
"Keep in mind that if the node you're operating on has child nodes you must "
436
440
"either transform the child nodes yourself or call the :meth:`generic_visit` "
@@ -439,7 +443,7 @@ msgstr ""
439
443
"操作しようとしているノードが子ノードを持つならば、その子ノードの変形も自分で行うか、またはそのノードに対し最初に "
440
444
":meth:`generic_visit` メソッドを呼び出すか、それを行うのはあなたの責任だということを肝に銘じましょう。"
441
445
442
- #: ../../library/ast.rst:313
446
+ #: ../../library/ast.rst:317
443
447
msgid ""
444
448
"For nodes that were part of a collection of statements (that applies to all "
445
449
"statement nodes), the visitor may also return a list of nodes rather than "
@@ -448,7 +452,7 @@ msgstr ""
448
452
"文のコレクションであるようなノード (全ての文のノードが当てはまります) "
449
453
"に対して、このビジターは単独のノードではなくノードのリストを返すかもしれません。"
450
454
451
- #: ../../library/ast.rst:317
455
+ #: ../../library/ast.rst:321
452
456
msgid ""
453
457
"If :class:`NodeTransformer` introduces new nodes (that weren't part of "
454
458
"original tree) without giving them location information (such as "
@@ -459,11 +463,11 @@ msgstr ""
459
463
"のような)位置情報を与えずに(元の木の一部ではなく)新しいノードを導入する場合、 :func:`fix_missing_locations` "
460
464
"を新しいサブツリーで呼び出して、位置情報を再計算する必要があります。"
461
465
462
- #: ../../library/ast.rst:325
466
+ #: ../../library/ast.rst:329
463
467
msgid "Usually you use the transformer like this::"
464
468
msgstr "たいてい、変換器の使い方は次のようになります::"
465
469
466
- #: ../../library/ast.rst:332
470
+ #: ../../library/ast.rst:336
467
471
msgid ""
468
472
"Return a formatted dump of the tree in *node*. This is mainly useful for "
469
473
"debugging purposes. If *annotate_fields* is true (by default), the returned"
@@ -478,7 +482,7 @@ msgstr ""
478
482
"がfalseの場合、あいまいさのないフィールド名を省略することにより、結果文字列はよりコンパクトになります。行番号や列オフセットのような属性はデフォルトではダンプされません。これがほ欲しければ、"
479
483
" *include_attributes* をtrueにセットすることができます。"
480
484
481
- #: ../../library/ast.rst:342
485
+ #: ../../library/ast.rst:346
482
486
msgid ""
483
487
"`Green Tree Snakes <https://greentreesnakes.readthedocs.io/>`_, an external "
484
488
"documentation resource, has good details on working with Python ASTs."