Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9399ed5

Browse files
author
github-actions
committed
Merge 3.11 into 3.9
1 parent 4155979 commit 9399ed5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

library/functions.po

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,6 +2978,14 @@ msgid ""
29782978
"changes in the class hierarchy, and because that order can include sibling "
29792979
"classes that are unknown prior to runtime)."
29802980
msgstr ""
2981+
"2つ目の用途は動的な実行環境において協調的 (cooperative) な多重継承をサポート"
2982+
"することです。これは Python に特有の用途で、静的にコンパイルされる言語や、単"
2983+
"継承のみをサポートする言語には見られないものです。この機能により、同じ名前の"
2984+
"メソッドを実装する複数の基底クラスを使った \"ダイヤモンド型* の継承構造を実装"
2985+
"することができます。良い設計は、そのような実装において、どのような場合でも同"
2986+
"じ呼び出しシグネチャを持つように強制します。 (理由は呼び出しの順序が実行時に"
2987+
"決定されること、呼び出し順序はクラス階層構造の変化に順応すること、そして呼び"
2988+
"出し順序が実行時まで未知の兄弟クラスが含まれる場合があることです)。"
29812989

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

29943005
#: ../../library/functions.rst:1664
29953006
msgid ""
@@ -3070,6 +3081,14 @@ msgid ""
30703081
"the :attr:`~object.__dict__` attribute. The following two statements create "
30713082
"identical :class:`type` objects:"
30723083
msgstr ""
3084+
"引数が3つの場合、新しい型オブジェクトを返します。これは本質的には :keyword:"
3085+
"`class` 文の動的な書式です。 *name* 文字列はクラス名で、 :attr:`~definition."
3086+
"__name__` 属性になります。 *bases* 基底クラスのタプルで、 :attr:`~class."
3087+
"__bases__` 属性になります; 空の場合は全てのクラスの基底クラスである :class:"
3088+
"`object` が追加されます。 *dict* は、クラス本体の属性とメソッドの定義を含む辞"
3089+
"書です; 辞書は :attr:`~object.__dict__` 属性になる前にコピーされたり、ラップ"
3090+
"されることがあります。以下の2つの文は同じ :class:`type` オブジェクトを生成し"
3091+
"ます:"
30733092

30743093
#: ../../library/functions.rst:1719
30753094
msgid "See also :ref:`bltin-type-objects`."
@@ -3082,6 +3101,9 @@ msgid ""
30823101
"in the same way that keywords in a class definition (besides *metaclass*) "
30833102
"would."
30843103
msgstr ""
3104+
"三引数形式の呼び出しに与えられたキーワード引数は、(*metaclass* を除く) クラス"
3105+
"定義におけるキーワード引数と同様に、適切なメタクラスの機構 (通常は :meth:"
3106+
"`~object.__init_subclass__`) に渡されます。"
30853107

30863108
#: ../../library/functions.rst:1726
30873109
msgid "See also :ref:`class-customization`."
@@ -3133,6 +3155,9 @@ msgid ""
31333155
"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class "
31343156
"defines the :attr:`~object.__slots__` attribute)."
31353157
msgstr ""
3158+
"指定されたオブジェクトに :attr:`~object.__dict__` 属性がない場合 (たとえばそ"
3159+
"のクラスが :attr:`~object.__slots__` 属性を定義している場合)、 :exc:"
3160+
"`TypeError` 例外が送出されます。"
31363161

31373162
#: ../../library/functions.rst:1752
31383163
msgid "Make an iterator that aggregates elements from each of the iterables."

0 commit comments

Comments
 (0)