@@ -2942,6 +2942,14 @@ msgid ""
29422942"changes in the class hierarchy, and because that order can include sibling "
29432943"classes that are unknown prior to runtime)."
29442944msgstr ""
2945+ "2つ目の用途は動的な実行環境において協調的 (cooperative) な多重継承をサポート"
2946+ "することです。これは Python に特有の用途で、静的にコンパイルされる言語や、単"
2947+ "継承のみをサポートする言語には見られないものです。この機能により、同じ名前の"
2948+ "メソッドを実装する複数の基底クラスを��った \" ダイヤモンド型* の継承構造を実装"
2949+ "することができます。良い設計は、そのような実装において、どのような場合でも同"
2950+ "じ呼び出しシグネチャを持つように強制します。 (理由は呼び出しの順序が実行時に"
2951+ "決定されること、呼び出し順序はクラス階層構造の変化に順応すること、そして呼び"
2952+ "出し順序が実行時まで未知の兄弟クラスが含まれる場合があることです)。"
29452953
29462954#: ../../library/functions.rst:1635
29472955msgid "For both use cases, a typical superclass call looks like this::"
@@ -2954,6 +2962,9 @@ msgid ""
29542962"lookups. One possible use case for this is calling :term:`descriptors "
29552963"<descriptor>` in a parent or sibling class."
29562964msgstr ""
2965+ "メソッドのルックアップに加えて、 :func:`super` は属性のルックアップに対しても"
2966+ "同様に動作します。考えうる用途のひとつは親クラスや兄弟クラスの :term:"
2967+ "`descriptors <descriptor>` (デスクリプタ) を呼び出すことです。"
29572968
29582969#: ../../library/functions.rst:1646
29592970msgid ""
@@ -3034,6 +3045,14 @@ msgid ""
30343045"the :attr:`~object.__dict__` attribute. The following two statements create "
30353046"identical :class:`type` objects:"
30363047msgstr ""
3048+ "引数が3つの場合、新しい型オブジェクトを返します。これは本質的には :keyword:"
3049+ "`class` 文の動的な書式です。 *name* 文字列はクラス名で、 :attr:`~definition."
3050+ "__name__` 属性になります。 *bases* 基底クラスのタプルで、 :attr:`~class."
3051+ "__bases__` 属性になります; 空の場合は全てのクラスの基底クラスである :class:"
3052+ "`object` が追加されます。 *dict* は、クラス本体の属性とメソッドの定義を含む辞"
3053+ "書です; 辞書は :attr:`~object.__dict__` 属性になる前にコピーされたり、ラップ"
3054+ "されることがあります。以下の2つの文は同じ :class:`type` オブジェクトを生成し"
3055+ "ます:"
30373056
30383057#: ../../library/functions.rst:1701
30393058msgid "See also :ref:`bltin-type-objects`."
@@ -3046,6 +3065,9 @@ msgid ""
30463065"in the same way that keywords in a class definition (besides *metaclass*) "
30473066"would."
30483067msgstr ""
3068+ "三引数形式の呼び出しに与えられたキーワード引数は、(*metaclass* を除く) クラス"
3069+ "定義におけるキーワード引数と同様に、適切なメタクラスの機構 (通常は :meth:"
3070+ "`~object.__init_subclass__`) に渡されます。"
30493071
30503072#: ../../library/functions.rst:1708
30513073msgid "See also :ref:`class-customization`."
@@ -3097,6 +3119,9 @@ msgid ""
30973119"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class "
30983120"defines the :attr:`~object.__slots__` attribute)."
30993121msgstr ""
3122+ "指定されたオブジェクトに :attr:`~object.__dict__` 属性がない場合 (たとえばそ"
3123+ "のクラスが :attr:`~object.__slots__` 属性を定義している場合)、 :exc:"
3124+ "`TypeError` 例外が送出されます。"
31003125
31013126#: ../../library/functions.rst:1734
31023127msgid "Make an iterator that aggregates elements from each of the iterables."
0 commit comments