@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.6\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2018-10-24 14:42 +0900\n "
14
+ "POT-Creation-Date : 2018-11-26 14:59 +0900\n "
15
15
"PO-Revision-Date : 2018-06-29 17:32+0000\n "
16
16
"Last-Translator : tomo🐧, 2018\n "
17
17
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -69,7 +69,7 @@ msgstr ""
69
69
"場合には正の数を返す、あらゆる呼び出し可能オブジェクトです。key "
70
70
"関数は呼び出し可能オブジェクトで、1つの引数を受け取り、ソートキーとして使われる値を返します。"
71
71
72
- #: ../../library/functools.rst:37 ../../library/functools.rst:221
72
+ #: ../../library/functools.rst:37 ../../library/functools.rst:226
73
73
msgid "Example::"
74
74
msgstr "以下はプログラム例です::"
75
75
@@ -153,10 +153,18 @@ msgstr ""
153
153
"に最も効率が良くなります。キャッシュのサイズ制限は、キャッシュがウェブサーバーなどの長期間に渡るプロセスにおける限界を超えては大きくならないことを保証します。"
154
154
155
155
#: ../../library/functools.rst:83
156
+ msgid ""
157
+ "In general, the LRU cache should only be used when you want to reuse "
158
+ "previously computed values. Accordingly, it doesn't make sense to cache "
159
+ "functions with side-effects, functions that need to create distinct mutable "
160
+ "objects on each call, or impure functions such as time() or random()."
161
+ msgstr ""
162
+
163
+ #: ../../library/functools.rst:88
156
164
msgid "Example of an LRU cache for static web content::"
157
165
msgstr "静的 web コンテンツ の LRU キャッシュの例::"
158
166
159
- #: ../../library/functools.rst:102
167
8000
+ #: ../../library/functools.rst:107
160
168
msgid ""
161
169
"Example of efficiently computing `Fibonacci numbers "
162
170
"<https://en.wikipedia.org/wiki/Fibonacci_number>`_ using a cache to "
@@ -166,11 +174,11 @@ msgstr ""
166
174
"キャッシュを使って `動的計画法 <https://ja.wikipedia.org/wiki/動的計画法>`_ の技法を実装し、`フィボナッチ数 "
167
175
"<https://ja.wikipedia.org/wiki/フィボナッチ数>`_ を効率よく計算する例::"
168
176
169
- #: ../../library/functools.rst:122
177
+ #: ../../library/functools.rst:127
170
178
msgid "Added the *typed* option."
171
179
msgstr "*typed* オプションが追加されました。"
172
180
173
- #: ../../library/functools.rst:127
181
+ #: ../../library/functools.rst:132
174
182
msgid ""
175
183
"Given a class defining one or more rich comparison ordering methods, this "
176
184
"class decorator supplies the rest. This simplifies the effort involved in "
@@ -179,7 +187,7 @@ msgstr ""
179
187
"ひとつ以上の拡張順序比較メソッド (rich comparison ordering methods) "
180
188
"を定義したクラスを受け取り、残りを実装するクラスデコレータです。このデコレータは全ての拡張順序比較演算をサポートするための労力を軽減します:"
181
189
182
- #: ../../library/functools.rst:131
190
+ #: ../../library/functools.rst:136
6D40
183
191
msgid ""
184
192
"The class must define one of :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`,"
185
193
" or :meth:`__ge__`. In addition, the class should supply an :meth:`__eq__` "
@@ -188,11 +196,11 @@ msgstr ""
188
196
"引数のクラスは、 :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, :meth:`__ge__` "
189
197
"の中からどれか1つと、 :meth:`__eq__` メソッドを定義する必要があります。"
190
198
191
- #: ../../library/functools.rst:135
199
+ #: ../../library/functools.rst:140
192
200
msgid "For example::"
193
201
msgstr "例えば::"
194
202
195
- #: ../../library/functools.rst:155
203
+ #: ../../library/functools.rst:160
196
204
msgid ""
197
205
"While this decorator makes it easy to create well behaved totally ordered "
198
206
"types, it *does* come at the cost of slower execution and more complex stack"
@@ -203,13 +211,13 @@ msgstr ""
203
211
"このデコレータにより、完全に順序の付いた振る舞いの良い型を簡単に作ることができますが、実行速度は遅くなり、派生した比較メソッドのスタックトレースは複雑になります。性能ベンチマークにより、これがアプリケーションのボトルネックになっていることがわかった場合は、代わりに"
204
212
" 6 つの拡張比較メソッドをすべて実装すれば、簡単にスピードアップを図れるでしょう。"
205
213
206
- #: ../../library/functools.rst:164
214
+ #: ../../library/functools.rst:169
207
215
msgid ""
208
216
"Returning NotImplemented from the underlying comparison function for "
209
217
"unrecognised types is now supported."
210
218
msgstr "認識できない型に対して下層の比較関数から NotImplemented を返すことがサポートされるようになりました。"
211
219
212
- #: ../../library/functools.rst:170
220
+ #: ../../library/functools.rst:175
213
221
msgid ""
214
222
"Return a new :ref:`partial object<partial-objects>` which when called will "
215
223
"behave like *func* called with the positional arguments *args* and keyword "
@@ -218,7 +226,7 @@ msgid ""
218
226
"extend and override *keywords*. Roughly equivalent to::"
219
227
msgstr ""
220
228
221
- #: ../../library/functools.rst:187
229
+ #: ../../library/functools.rst:192
222
230
msgid ""
223
231
"The :func:`partial` is used for partial function application which "
224
232
"\" freezes\" some portion of a function's arguments and/or keywords resulting"
@@ -231,7 +239,7 @@ msgstr ""
231
239
":func:`partial` を使って *base* 引数のデフォルトが 2 である :func:`int` "
232
240
"関数のように振る舞う呼び出し可能オブジェクトを作ることができます:"
233
241
234
- #: ../../library/functools.rst:202
242
+ #: ../../library/functools.rst:207
235
243
msgid ""
236
244
"Return a new :class:`partialmethod` descriptor which behaves like "
237
245
":class:`partial` except that it is designed to be used as a method "
@@ -240,15 +248,15 @@ msgstr ""
240
248
":class:`partial` と似た動作をする新しい :class:`partialmethod` 記述子 (デスクリプタ) "
241
249
"を返します。直接呼び出しではなく、メソッド定義としての使用が目的であることのみが、partial とは異なります。"
242
250
243
- #: ../../library/functools.rst:206
251
+ #: ../../library/functools.rst:211
244
252
msgid ""
245
253
"*func* must be a :term:`descriptor` or a callable (objects which are both, "
246
254
"like normal functions, are handled as descriptors)."
247
255
msgstr ""
248
256
"*func* は、:term:`descriptor` または呼び出し可能オブジェクトである必要があります "
249
257
"(通常の関数など、両方の性質を持つオブジェクトは記述子として扱われます。)"
250
258
251
- #: ../../library/functools.rst:209
259
+ #: ../../library/functools.rst:214
252
260
msgid ""
253
261
"When *func* is a descriptor (such as a normal Python function, "
254
262
":func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or another"
@@ -257,7 +265,7 @@ msgid ""
257
265
"objects>` returned as the result."
258
266
msgstr ""
259
267
260
- #: ../../library/functools.rst:215
268
+ #: ../../library/functools.rst:220
261
269
msgid ""
262
270
"When *func* is a non-descriptor callable, an appropriate bound method is "
263
271
"created dynamically. This behaves like a normal Python function when used as"
@@ -269,7 +277,7 @@ msgstr ""
269
277
"は、メソッドとして使用された場合、Python の通常の関数と同様に動作します。 :class:`partialmethod` コンストラクタに "
270
278
"*args* と *keywords* が渡されるよりも前に、 *self* 引数が最初の位置引数として挿入されます。"
271
279
272
- #: ../../library/functools.rst:246
280
+ #: ../../library/functools.rst:251
273
281
msgid ""
274
282
"Apply *function* of two arguments cumulatively to the items of *sequence*, "
275
283
"from left to right, so as to reduce the sequence to a single value. For "
@@ -288,18 +296,18 @@ msgstr ""
288
296
"が存在する場合、計算の際にイテラブルの先頭に置かれ、またイテラブルが空の場合のデフォルトになります。*initializer* "
289
297
"が与えられておらず、*iterable* が単一の要素しか持っていない場合、最初の要素が返されます。"
290
298
291
- #: ../../library/functools.rst:255
299
10000
+ #: ../../library/functools.rst:260
292
300
msgid "Roughly equivalent to::"
293
301
msgstr "およそ次と等価です::"
294
302
295
- #: ../../library/functools.rst:270
303
+ #: ../../library/functools.rst:275
296
304
msgid ""
297
305
"Transform a function into a :term:`single-dispatch <single dispatch>` "
298
306
":term:`generic function`."
299
307
msgstr ""
300
308
"関数を :term:`シングルディスパッチ <single dispatch>` :term:`generic function` に変換します。"
301
309
302
- #: ../../library/functools.rst:273
310
+ #: ../../library/functools.rst:278
303
311
msgid ""
304
312
"To define a generic function, decorate it with the ``@singledispatch`` "
305
313
"decorator. Note that the dispatch happens on the type of the first argument,"
@@ -308,7 +316,7 @@ msgstr ""
308
316
"汎用関数を定義するには、 ``@singledispatch`` デコレータでデコレートします。ディスパッチは 1 "
309
317
"つ目の引数の型で行われることに注意して、関数を次のように作成してください::"
310
318
311
- #: ../../library/functools.rst:284
319
+ #: ../../library/functools.rst:289
312
320
msgid ""
313
321
"To add overloaded implementations to the function, use the :func:`register` "
314
322
"attribute of the generic function. It is a decorator, taking a type "
@@ -318,13 +326,13 @@ msgstr ""
318
326
"関数にオーバーロード実装を追加するには、汎用関数の :func:`register` "
319
327
"属性を使用します。この属性は、型引数を取り、その型の操作を実装する関数をデコレートするデコレータです::"
320
328
321
- #: ../../library/functools.rst:302
329
+ #: ../../library/functools.rst:307
322
330
msgid ""
323
331
"To enable registering lambdas and pre-existing functions, the "
324
332
":func:`register` attribute can be used in a functional form::"
325
333
msgstr ":func:`register` 属性を関数形式で使用すると、lambda 関数と既存の関数の登録を有効にできます::"
326
334
327
- #: ../../library/functools.rst:310
335
+ #: ../../library/functools.rst:315
328
336
msgid ""
329
337
"The :func:`register` attribute returns the undecorated function which "
330
338
"enables decorator stacking, pickling, as well as creating unit tests for "
@@ -333,13 +341,13 @@ msgstr ""
333
341
" :func:`register` 属性は、デコレートされていない関数を返します。この関数により、複層デコレータ、デコレータの pickle "
334
342
"化、各変数の独立なユニットテストの作成が可能です::"
335
343
336
- #: ../../library/functools.rst:324
344
+ #: ../../library/functools.rst:329
337
345
msgid ""
338
346
"When called, the generic function dispatches on the type of the first "
339
347
"argument::"
340
348
msgstr "汎用関数は、呼び出されると 1 つ目の引数の型でディスパッチします::"
341
349
342
- #: ../../library/functools.rst:344
350
+ #: ../../library/functools.rst:349
343
351
msgid ""
344
352
"Where there is no registered implementation for a specific type, its method "
345
353
"resolution order is used to find a more generic implementation. The original"
@@ -350,19 +358,19 @@ msgstr ""
350
358
"特定の型について登録された実装が存在しない場合、その型のメソッド解決順序が、汎用の実装をさらに検索するために使用されます。``@singledispatch``"
351
359
" でデコレートされた元の関数は基底の ``object`` 型に登録されます。これは、他によりよい実装が見つからないことを意味します。"
352
360
353
- #: ../../library/functools.rst:350
361
+ #: ../../library/functools.rst:355
354
362
msgid ""
355
363
"To check which implementation will the generic function choose for a given "
356
364
"type, use the ``dispatch()`` attribute::"
357
365
msgstr "指定された型に対して、汎用関数がどの実装を選択するかを確認するには、``dispatch()`` 属性を使用します::"
358
366
359
- #: ../../library/functools.rst:358
367
+ #: ../../library/functools.rst:363
360
368
msgid ""
361
369
"To access all registered implementations, use the read-only ``registry`` "
362
370
"attribute::"
363
371
msgstr "登録されたすべての実装にアクセスするには、読み出し専用の ``registry`` 属性を使用します::"
364
372
365
- #: ../../library/functools.rst:375
373
+ #: ../../library/functools.rst:380
366
374
msgid ""
367
375
"Update a *wrapper* function to look like the *wrapped* function. The "
368
376
"optional arguments are tuples to specify which attributes of the original "
@@ -381,7 +389,7 @@ msgstr ""
381
389
"``__qualname__``, ``__annotations__`` そしてドキュメンテーション文字列 ``__doc__`` に代入する) と "
382
390
"``WRAPPER_UPDATES`` (これはラッパー関数の ``__dict__`` すなわちインスタンス辞書をアップデートする) です。"
383
391
384
- #: ../../library/functools.rst:385
392
+ #: ../../library/functools.rst:390
385
393
msgid ""
386
394
"To allow access to the original function for introspection and other "
387
395
"purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), "
@@ -391,7 +399,7 @@ msgstr ""
391
399
"内観や別の目的 (例えば、 :func:`lru_cache` のようなキャッシュするデコレータの回避) "
392
400
"のために元の関数にア
1241
セスできるように、この関数はラップされている関数を参照するラッパーに自動的に ``__wrapped__`` 属性を追加します。"
393
401
394
- #: ../../library/functools.rst:390
402
+ #: ../../library/functools.rst:395
395
403
msgid ""
396
404
"The main intended use for this function is in :term:`decorator` functions "
397
405
"which wrap the decorated function and return the wrapper. If the wrapper "
@@ -402,7 +410,7 @@ msgstr ""
402
410
"この関数は主に関数を包んでラッパーを返す :term:`デコレータ <decorator>` "
403
411
"関数の中で使われるよう意図されています。もしラッパー関数がアップデートされないとすると、返される関数のメタデータは元の関数の定義ではなくラッパー関数の定義を反映してしまい、これは通常あまり有益ではありません。"
404
412
405
- #: ../../library/functools.rst:396
413
+ #: ../../library/functools.rst:401
406
414
msgid ""
407
415
":func:`update_wrapper` may be used with callables other than functions. Any "
408
416
"attributes named in *assigned* or *updated* that are missing from the object"
@@ -415,19 +423,19 @@ msgstr ""
415
423
"(すなわち、ラッパー関数にそれらの属性を設定しようとは試みられません)。しかし、 *updated* で指名された属性がラッパー関数自身に存在しないなら"
416
424
" :exc:`AttributeError` が送出されます。"
417
425
418
- #: ../../library/functools.rst:402
426
+ #: ../../library/functools.rst:407
419
427
msgid "Automatic addition of the ``__wrapped__`` attribute."
420
428
msgstr "``__wrapped__`` 属性の自動的な追加。"
421
429
422
- #: ../../library/functools.rst:405
430
+ #: ../../library/functools.rst:410
423
431
msgid "Copying of the ``__annotations__`` attribute by default."
424
432
msgstr "デフォルトで ``__annotations__`` 属性がコピーされます。"
425
433
426
- #: ../../library/functools.rst:408
434
+ #: ../../library/functools.rst:413
427
435
msgid "Missing attributes no longer trigger an :exc:`AttributeError`."
428
436
msgstr "存在しない属性によって :exc:`AttributeError` を発生しなくなりました。"
429
437
430
- #: ../../library/functools.rst:411
438
+ #: ../../library/functools.rst:416
431
439
msgid ""
432
440
"The ``__wrapped__`` attribute now always refers to the wrapped function, "
433
441
"even if that function defined a ``__wrapped__`` attribute. (see "
@@ -436,7 +444,7 @@ msgstr ""
436
444
"ラップされた関数が ``__wrapped__`` を定義していない場合でも、 ``__wrapped__`` "
437
445
"が常にラップされた関数を参照するようになりました。(:issue:`17482` を参照)"
438
446
439
- #: ../../library/functools.rst:419
447
+ #: ../../library/functools.rst:424
440
448
msgid ""
441
449
"This is a convenience function for invoking :func:`update_wrapper` as a "
442
450
"function decorator when defining a wrapper function. It is equivalent to "
@@ -447,7 +455,7 @@ msgstr ""
447
455
"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, "
448
456
"updated=updated)`` と等価です。例えば::"
449
457
450
- #: ../../library/functools.rst:445
458
+ #: ../../library/functools.rst:450
451
459
msgid ""
452
460
"Without the use of this decorator factory, the name of the example function "
453
461
"would have been ``'wrapper'``, and the docstring of the original "
@@ -456,39 +464,39 @@ msgstr ""
456
464
"このデコレータ・ファクトリを使用しないと、上の例中の関数の名前は ``'wrapper'`` となり、元の :func:`example` "
457
465
"のドキュメンテーション文字列は失われてしまいます。"
458
466
459
- #: ../../library/functools.rst:453
467
+ #: ../../library/functools.rst:458
460
468
msgid ":class:`partial` Objects"
461
469
msgstr ":class:`partial` オブジェクト"
462
470
463
- #: ../../library/functools.rst:455
471
+ #: ../../library/functools.rst:460
464
472
msgid ""
465
473
":class:`partial` objects are callable objects created by :func:`partial`. "
466
474
"They have three read-only attributes:"
467
475
msgstr ""
468
476
":class:`partial` オブジェクトは、 :func:`partial` "
469
477
"関数によって作られる呼び出し可能オブジェクトです。オブジェクトには読み出し専用の属性が三つあります:"
470
478
471
- #: ../../library/functools.rst:461
479
+ #: ../../library/functools.rst:466
472
480
msgid ""
473
481
"A callable object or function. Calls to the :class:`partial` object will be"
474
482
" forwarded to :attr:`func` with new arguments and keywords."
475
483
msgstr ""
476
484
"呼び出し可能オブジェクトまたは関数です。 :class:`partial` オブジェクトの呼び出しは新しい引数とキーワードと共に "
477
485
":attr:`func` に転送されます。"
478
486
479
- #: ../../library/functools.rst:467
487
+ #: ../../library/functools.rst:472
480
488
msgid ""
481
489
"The leftmost positional arguments that will be prepended to the positional "
482
490
"arguments provided to a :class:`partial` object call."
483
491
msgstr "最左の位置引数で、 :class:`partial` オブジェクトの呼び出し時にその呼び出しの際の位置引数の前に追加されます。"
484
492
485
- #: ../../library/functools.rst:473
493
+ #: ../../library/functools.rst:478
486
494
msgid ""
487
495
"The keyword arguments that will be supplied when the :class:`partial` object"
488
496
" is called."
489
497
msgstr ":class:`partial` オブジェクトの呼び出し時に渡されるキーワード引数です。"
490
498
491
- #: ../../library/functools.rst:476
499
+ #: ../../library/functools.rst:481
492
500
msgid ""
493
501
":class:`partial` objects are like :class:`function` objects in that they are"
494
502
" callable, weak referencable, and can have attributes. There are some "
0 commit comments