Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60ac52c

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parentbb1c5c7 commit60ac52c

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

‎library/functions.po

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,6 +2988,14 @@ msgid ""
29882988
"mixed type comparisons which can call reflected the :meth:`~object.__gt__` "
29892989
"method."
29902990
msgstr""
2991+
"ソートアルゴリズムは、要素間の比較に ``<`` 演算子だけを使います。したがって"
2992+
"ソートのためには :meth:`~object.__lt__` メソッドを定義すれば十分なはずです"
2993+
"が、 :PEP:`8` は6つの :ref:`比較演算子 <comparisons>` を全て実装することを推"
2994+
"奨しています。これにより、異なるメソッドを必要とする :func:`max` のような他の"
2995+
"ソートツールを、同じデータに対して適用することによって起こりうるバグを避ける"
2996+
"助けになります。6つの比較演算子を全て実装することは、リフレクションによって :"
2997+
"meth:`~object.__gt__` メソッドを呼び出す可能性のある型混合の比較での混乱を避"
2998+
"けることにも役立ちます。 "
29912999

29923000
#:../../library/functions.rst:1643
29933001
msgid""
@@ -3021,6 +3029,9 @@ msgid ""
30213029
"an instance (such as ``C().f()``). Moreover, they can be called as regular "
30223030
"functions (such as ``f()``)."
30233031
msgstr""
3032+
"静的メソッドは (``C.f()`` のように) クラスに対して呼び出すことも、 (``C()."
3033+
"f()`` のように) インスタンスに対して呼び出すこともできます。さらに、 "
3034+
"(``f()`` のように) 普通の関数として呼び出すこともできます。"
30243035

30253036
#:../../library/functions.rst:1663
30263037
msgid""
@@ -3056,6 +3067,10 @@ msgid ""
30563067
"``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a "
30573068
"new ``__wrapped__`` attribute, and are now callable as regular functions."
30583069
msgstr""
3070+
"静的メソッドはメソッド属性 (``__module__``, ``__name__``, ``__qualname__``, "
3071+
"``__doc__`` そして ``__annotations__``) を継承するようになり、また新たに "
3072+
"``__wrapped__`` 属性を持つようになりました。さらに、静的メソッドを通常の関数"
3073+
"として呼び出すことができるようになりました。"
30593074

30603075
#:../../library/functions.rst:1696
30613076
msgid""
@@ -3171,6 +3186,14 @@ msgid ""
31713186
"changes in the class hierarchy, and because that order can include sibling "
31723187
"classes that are unknown prior to runtime)."
31733188
msgstr""
3189+
"2つ目の用途は動的な実行環境において協調的 (cooperative) な多重継承をサポート"
3190+
"することです。これは Python に特有の用途で、静的にコンパイルされる言語や、単"
3191+
"継承のみをサポートする言語には見られないものです。この機能により、同じ名前の"
3192+
"メソッドを実装する複数の基底クラスを使った\"ダイヤモンド型* の継承構造を実装"
3193+
"することができます。良い設計は、そのような実装において、どのような場合でも同"
3194+
"じ呼び出しシグネチャを持つように強制します。 (理由は呼び出しの順序が実行時に"
3195+
"決定されること、呼び出し順序はクラス階層構造の変化に順応すること、そして呼び"
3196+
"出し順序が実行時まで未知の兄弟クラスが含まれる場合があることです)。"
31743197

31753198
#:../../library/functions.rst:1756
31763199
msgid"For both use cases, a typical superclass call looks like this::"
@@ -3183,6 +3206,9 @@ msgid ""
31833206
"lookups. One possible use case for this is calling :term:`descriptors "
31843207
"<descriptor>` in a parent or sibling class."
31853208
msgstr""
3209+
"メソッドのルックアップに加えて、 :func:`super` は属性のルックアップに対しても"
3210+
"同様に動作します。考えうる用途のひとつは親クラスや兄弟クラスの :term:"
3211+
"`descriptors <descriptor>` (デスクリプタ) を呼び出すことです。"
31863212

31873213
#:../../library/functions.rst:1767
31883214
msgid""
@@ -3263,6 +3289,14 @@ msgid ""
32633289
"the :attr:`~object.__dict__` attribute. The following two statements create "
32643290
"identical :class:`type` objects:"
32653291
msgstr""
3292+
"引数が3つの場合、新しい型オブジェクトを返します。これは本質的には :keyword:"
3293+
"`class` 文の動的な書式です。 *name* 文字列はクラス名で、 :attr:`~definition."
3294+
"__name__` 属性になります。 *bases* 基底クラスのタプルで、 :attr:`~class."
3295+
"__bases__` 属性になります; 空の場合は全てのクラスの基底クラスである :class:"
3296+
"`object` が追加されます。 *dict* は、クラス本体の属性とメソッドの定義を含む辞"
3297+
"書です; 辞書は :attr:`~object.__dict__` 属性になる前にコピーされたり、ラップ"
3298+
"されることがあります。以下の2つの文は同じ :class:`type` オブジェクトを生成し"
3299+
"ます:"
32663300

32673301
#:../../library/functions.rst:1822
32683302
msgid"See also :ref:`bltin-type-objects`."
@@ -3275,6 +3309,9 @@ msgid ""
32753309
"in the same way that keywords in a class definition (besides *metaclass*) "
32763310
"would."
32773311
msgstr""
3312+
"三引数形式の呼び出しに与えられたキーワード引数は、(*metaclass* を除く) クラス"
3313+
"定義におけるキーワード引数と同様に、適切なメタクラスの機構 (通常は :meth:"
3314+
"`~object.__init_subclass__`) に渡されます。"
32783315

32793316
#:../../library/functions.rst:1829
32803317
msgid"See also :ref:`class-customization`."
@@ -3326,12 +3363,17 @@ msgid ""
33263363
"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class "
33273364
"defines the :attr:`~object.__slots__` attribute)."
33283365
msgstr""
3366+
"指定されたオブジェクトに :attr:`~object.__dict__` 属性がない場合 (たとえばそ"
3367+
"のクラスが :attr:`~object.__slots__` 属性を定義している場合)、 :exc:"
3368+
"`TypeError` 例外が送出されます。"
33293369

33303370
#:../../library/functions.rst:1855
33313371
msgid""
33323372
"Iterate over several iterables in parallel, producing tuples with an item "
33333373
"from each one."
33343374
msgstr""
3375+
"複数のイテラブルを並行に反復処理し、各イテラブルの要素からなるタプルを生成し"
3376+
"ます。"
33353377

33363378
#:../../library/functions.rst:1858
33373379
msgid"Example::"
@@ -3342,20 +3384,28 @@ msgid ""
33423384
"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th "
33433385
"tuple contains the *i*-th element from each of the argument iterables."
33443386
msgstr""
3387+
"より正式な定義: :func:`zip` は、 *i* 番目のタプルが 引数に与えた各イテラブル"
3388+
"の *i* 番目の要素を含むような、タプルのイテレータを返します。"
33453389

33463390
#:../../library/functions.rst:1870
33473391
msgid""
33483392
"Another way to think of :func:`zip` is that it turns rows into columns, and "
33493393
"columns into rows. This is similar to `transposing a matrix <https://en."
33503394
"wikipedia.org/wiki/Transpose>`_."
33513395
msgstr""
3396+
":func:`zip` に対する別の考え方は、この関数は行を列に、また列を行に変換すると"
3397+
"いうことです。これは `行列の転置 <https://en.wikipedia.org/wiki/Transpose>`_ "
3398+
"とよく似ています。"
33523399

33533400
#:../../library/functions.rst:1874
33543401
msgid""
33553402
":func:`zip` is lazy: The elements won't be processed until the iterable is "
33563403
"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:"
33573404
"`list`."
33583405
msgstr""
3406+
":func:`zip` は遅延評価です: イテラブルが :keyword:`!for` ループに渡された"
3407+
"り、 :class:`list` でラップされたりするなどして反復処理されるまで、要素が実際"
3408+
"に処理されることはありません。"
33593409

33603410
#:../../library/functions.rst:1878
33613411
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp