@@ -72,6 +72,9 @@ msgid ""
7272" exceptions described below, nothing in :func:`dataclass` examines the type "
7373"specified in the variable annotation."
7474msgstr ""
75+ ":func:`dataclass` デコレータは、``フィールド`` を探すためにクラスを検査します。``フィールド`` "
76+ "の定義は型アノテーションを持つクラス変数です。後述する2つの例外を除き、:func:`dataclass` "
77+ "は、変数アノテーションで指定した型を検査しません。"
7578
7679#: ../../library/dataclasses.rst:58
7780msgid ""
@@ -87,7 +90,7 @@ msgid ""
8790"decorator returns the same class that is called on; no new class is created."
8891msgstr ""
8992":func:`dataclass` デコレータは、後述する様々な \" ダンダー\" メソッド (訳注:dunderはdouble "
90- "underscoreの略で、前と後ろそれぞれにアンダースコアが2つ付いているメソッド ) "
93+ "underscoreの略で、メソッド名の前後にアンダースコアが2つ付いているメソッド ) "
9194"をクラスに追加します。クラスに既にこれらのメソッドが存在する場合の動作は、後述する引数によって異なります。デコレータは呼び出した際に指定したクラスと同じクラスを返します。新しいクラスは生成されません。"
9295
9396#: ../../library/dataclasses.rst:67
@@ -97,7 +100,7 @@ msgid ""
97100"is, these three uses of :func:`dataclass` are equivalent::"
98101msgstr ""
99102":func:`dataclass` "
100- "が引数を指定しない単純なデコレータとして使用された場合、シグネチャに文書化されたデフォルト値のとおりに動作します 。つまり、以下の3つの "
103+ "が引数を指定しない単純なデコレータとして使用された場合、ドキュメントに記載されているシグネチャのデフォルト値のとおりに動作します 。つまり、以下の3つの "
101104":func:`dataclass` の用例は同等です::"
102105
103106#: ../../library/dataclasses.rst:84
@@ -108,7 +111,7 @@ msgstr ":func:`dataclass` の引数は以下の通りです::"
108111msgid ""
109112"``init``: If true (the default), a :meth:`__init__` method will be "
110113"generated."
111- msgstr "``init``: true (デフォルト値) を指定すると 、 :meth:`__init__` メソッドが生成されます。"
114+ msgstr "``init``: (デフォルトの)真の場合 、 :meth:`__init__` メソッドが生成されます。"
112115
113116#: ../../library/dataclasses.rst:89
114117msgid ""
@@ -124,7 +127,7 @@ msgid ""
124127"example: ``InventoryItem(name='widget', unit_price=3.0, "
125128"quantity_on_hand=10)``."
126129msgstr ""
127- "``repr``: (デフォルトの) 真の場合、 :meth:`__repr__` メソッドが生成されます。\n"
130+ "``repr``: (デフォルトの)真の場合、 :meth:`__repr__` メソッドが生成されます。\n"
128131"生成された repr 文字列には、クラス名、各フィールドの名前および repr 文字列が、クラス上での定義された順序で並びます。\n"
129132"repr から除外するように印が付けられたフィールドは、 repr 文字列には含まれません。\n"
130133"例えば、このようになります: ``InventoryItem(name='widget', unit_price=3.0, quantity_on_hand=10)`` 。"
@@ -140,7 +143,7 @@ msgid ""
140143"This method compares the class as if it were a tuple of its fields, in "
141144"order. Both instances in the comparison must be of the identical type."
142145msgstr ""
143- "``eq``: true (デフォルト値) を指定すると 、 :meth:`__eq__` "
146+ "``eq``: (デフォルトの)真の場合 、 :meth:`__eq__` "
144147"メソッドが生成されます。このメソッドはクラスの比較を、そのクラスのフィールドからなるタプルを比較するように行います。比較する2つのインスタンスのクラスは同一でなければなりません。"
145148
146149#: ../../library/dataclasses.rst:107
@@ -156,7 +159,7 @@ msgid ""
156159"order. Both instances in the comparison must be of the identical type. If "
157160"``order`` is true and ``eq`` is false, a :exc:`ValueError` is raised."
158161msgstr ""
159- "``order``: true を指定すると(デフォルト値は ``False``です) 、 "
162+ "``order``: 真 (デフォルト値 ``False``) の場合 、 "
160163":meth:`__lt__`、:meth:`__le__`、:meth:`__gt__`、:meth:`__ge__` "
161164"メソッドが生成されます。これらの比較は、クラスをそのフィールドからなるタプルであるかのように取り扱います。比較される2つのインスタンスは、同一の型でなければなりません。もし"
162165" ``order`` が true で、 ``eq`` に falseを指定すすると、:exc:`ValueError` が送出されます。"
@@ -166,14 +169,16 @@ msgid ""
166169"If the class already defines any of :meth:`__lt__`, :meth:`__le__`, "
167170":meth:`__gt__`, or :meth:`__ge__`, then :exc:`TypeError` is raised."
168171msgstr ""
169- "もし、クラスで既に :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, または :meth:`__ge__`"
170- " のいずれかが定義されていると :exc:`TypeError` が送出されます。"
172+ "もし、クラスで既に :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, :meth:`__ge__` "
173+ "のうちいずれかが定義されていると :exc:`TypeError` が送出されます。"
171174
172175#: ../../library/dataclasses.rst:121
173176msgid ""
174177"``unsafe_hash``: If ``False`` (the default), a :meth:`__hash__` method is "
175178"generated according to how ``eq`` and ``frozen`` are set."
176179msgstr ""
180+ "``unsafe_hash``: (デフォルトの)``False`` の場合、 ``eq`` と ``frozen`` がどう設定されているかに従って "
181+ ":meth:`__hash__` メソッドが生成されます。"
177182
178183#: ../../library/dataclasses.rst:124
179184msgid ""
@@ -250,7 +255,7 @@ msgid ""
250255" field with a default value. This is true either when this occurs in a "
251256"single class, or as a result of class inheritance."
252257msgstr ""
253- "デフォルト値を指定しないフィールドをデフォルト値を指定したフィールドの後ろに定義すると 、 :exc:`TypeError` "
258+ "デフォルト値を指定しないフィールドを、デフォルト値を指定したフィールドの後ろに定義すると 、 :exc:`TypeError` "
254259"が送出されます。これは、単一のクラスであっても、クラス継承の結果でも起きえます。"
255260
256261#: ../../library/dataclasses.rst:181
@@ -272,7 +277,7 @@ msgstr ""
272277
273278#: ../../library/dataclasses.rst:200
274279msgid "The parameters to :func:`field` are:"
275- msgstr ""
280+ msgstr ":func:`field` の引数は: "
276281
277282#: ../../library/dataclasses.rst:202
278283msgid ""
@@ -294,19 +299,22 @@ msgstr ""
294299msgid ""
295300"``init``: If true (the default), this field is included as a parameter to "
296301"the generated :meth:`__init__` method."
297- msgstr ""
302+ msgstr "``init``: (デフォルトの)真の場合、 生成される :meth:`__init__` メソッドの引数にこのフィールドを含めます。 "
298303
299304#: ../../library/dataclasses.rst:215
300305msgid ""
301306"``repr``: If true (the default), this field is included in the string "
302307"returned by the generated :meth:`__repr__` method."
303308msgstr ""
309+ "``repr``: (デフォルトの)真の場合、生成される :meth:`__repr__` メソッドによって返される文字列に、このフィールドを含めます。"
304310
305311#: ../../library/dataclasses.rst:218
306312msgid ""
307313"``compare``: If true (the default), this field is included in the generated "
308314"equality and comparison methods (:meth:`__eq__`, :meth:`__gt__`, et al.)."
309315msgstr ""
316+ "``compare``: (デフォルトの) 真の場合、生成される等価関数と比較関数( :meth:`__eq__` 、:meth:`__gt__` "
317+ "など)にこのフィールドを含めます。"
310318
311319#: ../../library/dataclasses.rst:222
312320msgid ""
0 commit comments