1111# Takeshi Nakazato, 2023
1212# Arihiro TAKASE, 2023
1313# Takanori Suzuki <takanori@takanory.net>, 2023
14+ # righteous righteous, 2023
1415#
1516#, fuzzy
1617msgid ""
1718msgstr ""
1819"Project-Id-Version : Python 3.12\n "
1920"Report-Msgid-Bugs-To : \n "
20- "POT-Creation-Date : 2023-09-29 14:12 +0000\n "
21+ "POT-Creation-Date : 2023-10-06 14:14 +0000\n "
2122"PO-Revision-Date : 2021-06-28 01:50+0000\n "
22- "Last-Translator : Takanori Suzuki <takanori@takanory.net> , 2023\n "
23+ "Last-Translator : righteous righteous , 2023\n "
2324"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
2425"ja/)\n "
2526"MIME-Version : 1.0\n "
@@ -37,6 +38,8 @@ msgid ""
3738"As well as the :keyword:`while` statement just introduced, Python uses a few "
3839"more that we will encounter in this chapter."
3940msgstr ""
41+ "前章で紹介した :keyword:`while` 文の他にも、 Python にはいくつか制御フロー"
42+ "ツールがあり、本章で説明します。"
4043
4144#: ../../tutorial/controlflow.rst:14
4245msgid ":keyword:`!if` Statements"
@@ -196,36 +199,45 @@ msgid ""
196199"The :keyword:`break` statement breaks out of the innermost enclosing :"
197200"keyword:`for` or :keyword:`while` loop."
198201msgstr ""
202+ ":keyword:`break` 文は、その `break` 文を内包している最も内側にある :keyword:"
203+ "`for` 文または :keyword:`while` 文から抜け出すことができます。"
199204
200205#: ../../tutorial/controlflow.rst:169
201206msgid ""
202207"A :keyword:`!for` or :keyword:`!while` loop can include an :keyword:`!else` "
203208"clause."
204209msgstr ""
210+ ":keyword:`!for` 文と :keyword:`!while` 文では :keyword:`!else` 節を書くことが"
211+ "できます。"
205212
206213#: ../../tutorial/controlflow.rst:171
207214msgid ""
208215"In a :keyword:`for` loop, the :keyword:`!else` clause is executed after the "
209216"loop reaches its final iteration."
210217msgstr ""
218+ ":keyword:`for` 文の場合、 :keyword:`!else` 節はループ処理の最後の回が実行され"
219+ "たあとに実行されます。"
211220
212221#: ../../tutorial/controlflow.rst:174
213222msgid ""
214223"In a :keyword:`while` loop, it's executed after the loop's condition becomes "
215224"false."
216225msgstr ""
226+ ":keyword:`while` 文の場合は、ループ条件が偽となったあとに実行されます。"
217227
218228#: ../../tutorial/controlflow.rst:176
219229msgid ""
220230"In either kind of loop, the :keyword:`!else` clause is **not** executed if "
221231"the loop was terminated by a :keyword:`break`."
222232msgstr ""
233+ "どちらのループ文でも、 :keyword:`break` によってループ処理が終了したときは :"
234+ "keyword:`!else` 節は**実行されません**。"
223235
224236#: ../../tutorial/controlflow.rst:179
225237msgid ""
226238"This is exemplified in the following :keyword:`!for` loop, which searches "
227239"for prime numbers::"
228- msgstr ""
240+ msgstr "その例として、素数を探索する :keyword:`!for` 文を以下に示します:: "
229241
230242#: ../../tutorial/controlflow.rst:200
231243msgid ""
@@ -316,9 +328,9 @@ msgid ""
316328"Note the last block: the \" variable name\" ``_`` acts as a *wildcard* and "
317329"never fails to match. If no case matches, none of the branches is executed."
318330msgstr ""
319- "最後のブロックについてのメモ : 変数名 ``_`` は *ワイルドカード* の働きをし、"
320- "マッチに絶対失敗しません 。マッチするケースがない場合は、そのブロックも実行さ "
321- "れません 。"
331+ "最後のブロックについて : 変数名 ``_`` は *ワイルドカード* の働きをし、マッチに "
332+ "絶対失敗しません 。マッチするケースがない場合は、そのブロックも実行されませ "
333+ "ん 。"
322334
323335#: ../../tutorial/controlflow.rst:284
324336msgid ""
@@ -342,11 +354,13 @@ msgid ""
342354"which makes it conceptually similar to the unpacking assignment ``(x, y) = "
343355"point``."
344356msgstr ""
345- "慎重に学んでください!最初のパターンには2つのリテラルがあり、上で示したリテラ"
346- "ルパターンの拡張と考えることができます。しかし次の2つのパターンはリテラルと変"
347- "数の組み合わせのため、対象(``point``)から値を取り出して変数に *結びつけ* ま"
348- "す。4番目のパターンは2つの値を取り込みます。これは、アンパック代入 ``(x, y) "
349- "= point`` と概念的に似ています。"
357+ "このコードは注意して見てください!\n"
358+ "最初のパターンには2つのリテラルがあり、上で示したリテラルパターンの拡張と考え"
359+ "ることができます。\n"
360+ "しかし次の2つのパターンはリテラルと変数の組み合わせのため、対象(``point``)か"
361+ "ら値を取り出して変数に *結びつけ* ます。\n"
362+ "4番目のパターンは2つの値を取り込みます。\n"
363+ "これは、アンパック代入 ``(x, y) = point`` と概念的に似ています。"
350364
351365#: ../../tutorial/controlflow.rst:312
352366msgid ""
@@ -382,18 +396,22 @@ msgid ""
382396"(recognized by the \" (...)\" next to them like ``Point`` above) are never "
383397"assigned to."
384398msgstr ""
385- "おすすめの方法は、どの変数になにが設定されるかを理解するために、パターンを代"
386- "入文の左側に配置するものを拡張した形式として読むことです。単独の名前(上記の "
387- "``var`` など)だけがマッチ文で値が代入されます。ドット付きの名前(``foo."
388- "bar`` など)、属性名(上記の ``x=``、``y=`` など )、クラス名(名前の後ろの "
389- "\" (...)\" によって判別される。上記の ``Point`` など)には値は代入されませ"
390- "ん。"
399+ "おすすめのパターンの読み方は、パターンが、代入文の左辺に配置するものを拡張し"
400+ "た形式であるとみなすことです。\n"
401+ "これにより、どの変数になにが代入されるかが分かります。\n"
402+ "単独の名前(上記の ``var`` など)だけがマッチ文で値が代入されます。ドット付き"
403+ "の名前(``foo.bar`` など)、属性名(上記の ``x=``、``y=`` など )、クラス名"
404+ "(名前の後ろの \" (...)\" によって判別される。上記の ``Point`` など)には値は"
405+ "代入されません。"
391406
392407#: ../../tutorial/controlflow.rst:352
393408msgid ""
394409"Patterns can be arbitrarily nested. For example, if we have a short list of "
395410"Points, with ``__match_args__`` added, we could match it like this::"
396411msgstr ""
412+ "パターンはいくらでも入れ子 (ネスト) にすることができます。例えば、 "
413+ "``__match_args__`` を追加した Point クラスのリストに対して次のようにマッチを"
414+ "行うことができます::"
397415
398416#: ../../tutorial/controlflow.rst:373
399417msgid ""
@@ -627,6 +645,21 @@ msgid ""
627645"this example it is equivalent to ``result = result + [a]``, but more "
628646"efficient."
629647msgstr ""
648+ "``result.append(a)`` という文で、 ``result`` オブジェクトの*メソッド* が呼び"
649+ "出されます。\n"
650+ "メソッドとは、オブジェクトに「属する」関数のことであり、 ``obj.methodname`` "
651+ "と表されます。\n"
652+ "ここで、 ``obj`` は何らかのオブジェクト (式の場合もあります) であり、 "
653+ "``methodname`` はそのオブジェクトの型で定義されたメソッド名です。\n"
654+ "色々な型がそれぞれ独自のメソッドを定義しています。\n"
655+ "異なる型が同じ名前のメソッドを持つことも可能であり、どちらの方のものであるか"
656+ "という曖昧さは生まれません。\n"
657+ "(*クラス*を使って独自の型やメソッドを自分で定義することもできます。参照: :"
658+ "ref:`tut-classes`)\n"
659+ "例にある :meth:`!append` メソッドは、リストオブジェクトに対して定義されている"
660+ "もので、リストの末尾に新しい要素を追加します。\n"
661+ "この例では ``result = result + [a]`` と等価ですが、計算効率の上ではベターで"
662+ "す。"
630663
631664#: ../../tutorial/controlflow.rst:545
632665msgid "More on Defining Functions"
@@ -1190,6 +1223,13 @@ msgid ""
11901223"denoting the end of the :keyword:`def` statement. The following example has "
11911224"a required argument, an optional argument, and the return value annotated::"
11921225msgstr ""
1226+ ":term:`アノテーション <function annotation>` は、関数の :attr:`!"
1227+ "__annotations__` 属性に辞書として格納され、関数の他の部分には影響しません。\n"
1228+ "パラメータアノテーションは、パラメータ名のあとのコロンと式で定義され、その式"
1229+ "の評価結果がアノテーションとなります。\n"
1230+ "戻り値アノテーションは、パラメータリストと :keyword:`def` 文の終わりを表すコ"
1231+ "ロンの間で、 ``->`` の後ろに式を書くことで定義されます。\n"
1232+ "次の例では、必須引数と任意引数、戻り値にアノテーションが付与されています::"
11931233
11941234#: ../../tutorial/controlflow.rst:1071
11951235msgid "Intermezzo: Coding Style"
@@ -1309,10 +1349,10 @@ msgid ""
13091349"a mutable object is passed, the caller will see any changes the callee makes "
13101350"to it (items inserted into a list)."
13111351msgstr ""
1312- "実際には 、*オブジェクトへの参照渡し (call by object reference)* と書けばよい "
1313- "のかもしれません 。というのは、変更可能なオブジェクトが渡されると、関数の呼び "
1314- "出し側は、呼び出された側の関数がオブジェクトに行ったどんな変更 (例えばリスト "
1315- "に挿入された要素) にも出くわすことになるからです 。"
1352+ "実のところ 、*オブジェクトへの参照渡し (call by object reference)* という言っ "
1353+ "たほうがより正確です 。というのは、変更可能なオブジェクトが渡されると、呼び出 "
1354+ "された側の関数がオブジェクトに行った変更 (例えばリストに挿入された要素) はす "
1355+ "べて、関数の呼び出し側にも反映されるからです 。"
13161356
13171357#: ../../tutorial/controlflow.rst:48
13181358msgid "statement"
0 commit comments