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

Skip to content

Commit 31c285b

Browse files
committed
heh
1 parent 1774e9b commit 31c285b

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

library/dataclasses.po

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,7 @@ msgstr ""
10051005

10061006
#: ../../library/dataclasses.rst:509
10071007
msgid "A sentinel value signifying a missing default or default_factory."
1008-
msgstr ""
1009-
"デフォルト値やdefault_factoryが設定されてない場合の番兵の値を設定します。"
1008+
msgstr "デフォルト値や default_factory が存在しないことを示す番兵値。"
10101009

10111010
#: ../../library/dataclasses.rst:513
10121011
msgid ""
@@ -1018,6 +1017,13 @@ msgid ""
10181017
"meth:`~object.__init__` parameters that must be specified as keywords when "
10191018
"the class is instantiated."
10201019
msgstr ""
1020+
"型アノテーションとして使用される番兵値です。:const:`!KW_ONLY` の型を持つ疑似フィールドの "
1021+
"後にあるすべてのフィールドは、キーワード専用フィールドとしてマークされます。"
1022+
":const:`!KW_ONLY` 型の疑似フィールドは、その他の点では完全に無視されることに "
1023+
"注意してください。これには、そのようなフィールドの名前も含まれます。慣例により、 "
1024+
":const:`!KW_ONLY` フィールドには ``_`` という名前が使用されます。キーワード専用 "
1025+
"フィールドは、クラスがインスタンス化される際にキーワードとして指定する必要がある "
1026+
":meth:`~object.__init__` パラメータを表します。"
10211027

10221028
#: ../../library/dataclasses.rst:522
10231029
msgid ""
@@ -1068,6 +1074,11 @@ msgid ""
10681074
"__init__` method is generated, then :meth:`!__post_init__` will not "
10691075
"automatically be called."
10701076
msgstr ""
1077+
"クラスで定義された場合、生成された :meth:`~object.__init__` によって、"
1078+
"通常は :meth:`!self.__post_init__` として呼び出されます。しかし、"
1079+
"``InitVar`` フィールドが定義されている場合、それらはクラスで定義された順序で "
1080+
":meth:`!__post_init__` にも渡されます。:meth:`!__init__` メソッドが生成されない場合、"
1081+
":meth:`!__post_init__` は自動的に呼び出されません。"
10711082

10721083
#: ../../library/dataclasses.rst:558
10731084
msgid ""
@@ -1097,6 +1108,10 @@ msgid ""
10971108
"class has an :meth:`!__init__` method that has to be called, it is common to "
10981109
"call this method in a :meth:`__post_init__` method::"
10991110
msgstr ""
1111+
":func:`@dataclass <dataclass>` によって生成された :meth:`~object.__init__` メソッドは、"
1112+
"ベースクラスの :meth:`!__init__` メソッドを呼び出しません。ベースクラスに呼び出す"
1113+
"必要がある :meth:`!__init__` メソッドがある場合、このメソッドを :meth:`__post_init__` "
1114+
"メソッドで呼び出すのが一般的です::"
11001115

11011116
#: ../../library/dataclasses.rst:575
11021117
msgid ""
@@ -1119,6 +1134,9 @@ msgid ""
11191134
"methods don't need to be called, since the derived dataclass will take care "
11201135
"of initializing all fields of any base class that is a dataclass itself."
11211136
msgstr ""
1137+
"ただし、一般的にはデータクラス生成の :meth:`!__init__` メソッドを呼び出す"
1138+
"必要はないことに注意してください。派生データクラスが、それ自体がデータクラス"
1139+
"であるベースクラスのすべてのフィールドの初期化を処理するためです。"
11221140

11231141
#: ../../library/dataclasses.rst:591
11241142
msgid ""
@@ -1145,6 +1163,12 @@ msgid ""
11451163
"Such ``ClassVar`` pseudo-fields are not returned by the module-level :func:"
11461164
"`fields` function."
11471165
msgstr ""
1166+
":func:`@dataclass <dataclass>` が実際にフィールドの型を検査する数少ない場所の一つは、"
1167+
"フィールドが :pep:`526` で定義されたクラス変数かどうかを判定することです。"
1168+
"これは、フィールドの型が :data:`typing.ClassVar` かどうかをチェックすることで行われます。"
1169+
"フィールドが ``ClassVar`` の場合、フィールドとしての考慮から除外され、"
1170+
"データクラスのメカニズムによって無視されます。そのような ``ClassVar`` 疑似フィールドは、"
1171+
"モジュールレベルの :func:`fields` 関数によって返されません。"
11481172

11491173
#: ../../library/dataclasses.rst:611
11501174
msgid "Init-only variables"
@@ -1447,16 +1471,21 @@ msgid ""
14471471
"`dict`, or :class:`set`, unhashable objects are now not allowed as default "
14481472
"values. Unhashability is used to approximate mutability."
14491473
msgstr ""
1474+
":class:`list`、:class:`dict`、:class:`set` 型のオブジェクトを探して禁止する代わりに、"
1475+
"現在はハッシュ化不可能なオブジェクトはデフォルト値として許可されていません。"
1476+
"ハッシュ化不可能性は可変性を近似するために使用されます。"
14501477

14511478
#: ../../library/dataclasses.rst:808
14521479
msgid "Descriptor-typed fields"
1453-
msgstr ""
1480+
msgstr "ディスクリプタ型フィールド"
14541481

14551482
#: ../../library/dataclasses.rst:810
14561483
msgid ""
14571484
"Fields that are assigned :ref:`descriptor objects <descriptors>` as their "
14581485
"default value have the following special behaviors:"
14591486
msgstr ""
1487+
"デフォルト値として :ref:`ディスクリプタオブジェクト <descriptors>` が割り当てられたフィールドは、"
1488+
"以下の特別な動作をします:"
14601489

14611490
#: ../../library/dataclasses.rst:813
14621491
msgid ""

0 commit comments

Comments
 (0)