@@ -2942,6 +2942,14 @@ msgid ""
2942
2942
"changes in the class hierarchy, and because that order can include sibling "
2943
2943
"classes that are unknown prior to runtime)."
2944
2944
msgstr ""
2945
+ "2つ目の用途は動的な実行環境において協調的 (cooperative) な多重継承をサポート"
2946
+ "することです。これは Python に特有の用途で、静的にコンパイルされる言語や、単"
2947
+ "継承のみをサポートする言語には見られないものです。この機能により、同じ名前の"
2948
+ "メソッドを実装する複数の基底クラスを使った\" ダイヤモンド型* の継承構造を実装"
2949
+ "することができます。良い設計は、そのような実装において、どのような場合でも同"
2950
+ "じ呼び出しシグネチャを持つように強制します。 (理由は呼び出しの順序が実行時に"
2951
+ "決定されること、呼び出し順序はクラス階層構造の変化に順応すること、そして呼び"
2952
+ "出し順序が実行時まで未知の兄弟クラスが含まれる場合があることです)。"
2945
2953
2946
2954
#: ../../library/functions.rst:1635
2947
2955
msgid "For both use cases, a typical superclass call looks like this::"
@@ -2954,6 +2962,9 @@ msgid ""
2954
2962
"lookups. One possible use case for this is calling :term:`descriptors "
2955
2963
"<descriptor>` in a parent or sibling class."
2956
2964
msgstr ""
2965
+ "メソッドのルックアップに加えて、 :func:`super` は属性のルックアップに対しても"
2966
+ "同様に動作します。考えうる用途のひとつは親クラスや兄弟クラスの :term:"
2967
+ "`descriptors <descriptor>` (デスクリプタ) を呼び出すことです。"
2957
2968
2958
2969
#: ../../library/functions.rst:1646
2959
2970
msgid ""
@@ -3034,6 +3045,14 @@ msgid ""
3034
3045
"the :attr:`~object.__dict__` attribute. The following two statements create "
3035
3046
"identical :class:`type` objects:"
3036
3047
msgstr ""
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
+ "ます:"
3037
3056
3038
3057
#: ../../library/functions.rst:1701
3039
3058
msgid "See also :ref:`bltin-type-objects`."
@@ -3046,6 +3065,9 @@ msgid ""
3046
3065
"in the same way that keywords in a class definition (besides *metaclass*) "
3047
3066
"would."
3048
3067
msgstr ""
3068
+ "三引数形式の呼び出しに与えられたキーワード引数は、(*metaclass* を除く) クラス"
3069
+ "定義におけるキーワード引数と同様に、適切なメタクラスの機構 (通常は :meth:"
3070
+ "`~object.__init_subclass__`) に渡されます。"
3049
3071
3050
3072
#: ../../library/functions.rst:1708
3051
3073
msgid "See also :ref:`class-customization`."
@@ -3097,6 +3119,9 @@ msgid ""
3097
3119
"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class "
3098
3120
"defines the :attr:`~object.__slots__` attribute)."
3099
3121
msgstr ""
3122
+ "指定されたオブジェクトに :attr:`~object.__dict__` 属性がない場合 (たとえばそ"
3123
+ "のクラスが :attr:`~object.__slots__` 属性を定義している場合)、 :exc:"
3124
+ "`TypeError` 例外が送出されます。"
3100
3125
3101
3126
#: ../../library/functions.rst:1734
3102
3127
msgid "Make an iterator that aggregates elements from each of the iterables."