Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd45713b

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parentce8dc09 commitd45713b

File tree

6 files changed

+61
-3
lines changed

6 files changed

+61
-3
lines changed

‎tutorial/classes.po

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ msgid ""
301301
"*new* local variable in the innermost scope, leaving the identically named "
302302
"outer variable unchanged)."
303303
msgstr""
304+
"名前が global と宣言されている場合、その名前に対する参照や代入は全て、モ"
305+
"ジュールのグローバルな名前の入った最後から2番目のスコープに対して直接行われま"
306+
"す。最内スコープの外側にある変数に再束縛するには、 :keyword:`nonlocal` 文が使"
307+
"えます。nonlocal と宣言されなかった変数は、全て読み出し専用となります (そのよ"
308+
"うな変数に対する書き込みは、単に *新しい* ローカル変数をもっとも内側のスコー"
309+
"プで作成し、外部のスコープの値は変化しません)。"
304310

305311
#:../../tutorial/classes.rst:133
306312
msgid""

‎tutorial/controlflow.po

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,28 +282,37 @@ msgid ""
282282
"also extract components (sequence elements or object attributes) from the "
283283
"value into variables."
284284
msgstr""
285+
":keyword:`match` 文は1つの式を指定し、その値と次に続く1つ以上のcaseブロックに"
286+
"指定されたパターンを比較します。この機能はCやJava、JavaScript(や他の多数の言"
287+
"語)のswitch文と表面的には似ていますが、RustやHaskellのパターンマッチングによ"
288+
"り似ています。最初にマッチしたパターンのみが実行され、コンポーネント(シーケン"
289+
"スの要素やオブジェクトの属性)から値を取り出して変数に代入することもできます。"
285290

286291
#:../../tutorial/controlflow.rst:261
287292
msgid""
288293
"The simplest form compares a subject value against one or more literals::"
289-
msgstr""
294+
msgstr"最も単純な形式は、対象の値に対して1つ以上のリテラルです::"
290295

291296
#:../../tutorial/controlflow.rst:274
292297
msgid""
293298
"Note the last block: the\"variable name\" ``_`` acts as a *wildcard* and "
294299
"never fails to match. If no case matches, none of the branches is executed."
295300
msgstr""
301+
"最後のブロックについてのメモ: 変数名 ``_`` は *ワイルドカード* の働きをし、"
302+
"マッチに絶対失敗しません。マッチするケースがない場合は、そのブロックも実行さ"
303+
"れません。"
296304

297305
#:../../tutorial/controlflow.rst:277
298306
msgid""
299307
"You can combine several literals in a single pattern using ``|`` (\"or\")::"
300308
msgstr""
309+
"複数のリテラルを``|`` (\"or\")を使用して組み合わせて1つのパターンにできます。"
301310

302311
#:../../tutorial/controlflow.rst:282
303312
msgid""
304313
"Patterns can look like unpacking assignments, and can be used to bind "
305314
"variables::"
306-
msgstr""
315+
msgstr"パターンはアンパック代入ができ、変数に結びつけられます::"
307316

308317
#:../../tutorial/controlflow.rst:298
309318
msgid""
@@ -314,13 +323,20 @@ msgid ""
314323
"which makes it conceptually similar to the unpacking assignment ``(x, y) = "
315324
"point``."
316325
msgstr""
326+
"慎重に学んでください!最初のパターンには2つのリテラルがあり、上で示したリテラ"
327+
"ルパターンの拡張と考えることができます。しかし次の2つのパターンはリテラルと変"
328+
"数の組み合わせのため、対象(``point``)から値を取り出して変数に *結びつけ* ま"
329+
"す。4番目のパターンは2つの値を捕まえます。これは、アンパック代入 ``(x, y) = "
330+
"point`` と概念的に似ています。"
317331

318332
#:../../tutorial/controlflow.rst:305
319333
msgid""
320334
"If you are using classes to structure your data you can use the class name "
321335
"followed by an argument list resembling a constructor, but with the ability "
322336
"to capture attributes into variables::"
323337
msgstr""
338+
"データを構造化するためにクラスを使っている場合は、クラス名の後ろにコンストラ"
339+
"クターのように引数のリストを指定できます。属性の値は変数に取り込まれます。"
324340

325341
#:../../tutorial/controlflow.rst:326
326342
msgid""
@@ -331,6 +347,11 @@ msgid ""
331347
"\"y\"), the following patterns are all equivalent (and all bind the ``y`` "
332348
"attribute to the ``var`` variable)::"
333349
msgstr""
350+
"いくつかの組み込みクラスでは位置引数が使用でき、属性の順番を提供します(例: "
351+
"データクラス)。クラスの ``__match_args__`` 特殊属性でによって、パターンの中で"
352+
"属性の明確な位置を定義することもできます。(\"x\",\"y\")が設定された場合、以"
353+
"下のすべてのパターンは等価です(すべて属性 ``y`` が ``var`` 変数に関連づけられ"
354+
"ます)::"
334355

335356
#:../../tutorial/controlflow.rst:337
336357
msgid""
@@ -348,17 +369,22 @@ msgid ""
348369
"Patterns can be arbitrarily nested. For example, if we have a short list of "
349370
"points, we could match it like this::"
350371
msgstr""
372+
"パターンは任意のネストができます。たとえば、短いポイントのリストがある場合、"
373+
"以下のようにマッチできます::"
351374

352375
#:../../tutorial/controlflow.rst:359
353376
msgid""
354377
"We can add an ``if`` clause to a pattern, known as a\"guard\". If the "
355378
"guard is false, ``match`` goes on to try the next case block. Note that "
356379
"value capture happens before the guard is evaluated::"
357380
msgstr""
381+
"パターンに ``if`` 節を追加できます。これは\"ガード\" と呼ばれます。ガードが"
382+
"falseの場合、``match`` は次のcaseブロックの処理に移動します。ガードを評価する"
383+
"前に値が取り出されることに注意してください::"
358384

359385
#:../../tutorial/controlflow.rst:369
360386
msgid"Several other key features of this statement:"
361-
msgstr""
387+
msgstr"この文のその他のいくつか重要な特徴::"
362388

363389
#:../../tutorial/controlflow.rst:371
364390
msgid""
@@ -410,6 +436,8 @@ msgid ""
410436
"For a more detailed explanation and additional examples, you can look into :"
411437
"pep:`636` which is written in a tutorial format."
412438
msgstr""
439+
"より詳細な説明と追加の例は :pep:`636` にチュートリアル形式で記述してありま"
440+
"す。"
413441

414442
#:../../tutorial/controlflow.rst:420
415443
msgid"Defining Functions"

‎tutorial/inputoutput.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,14 @@ msgid ""
391391
"`binary mode`. Binary mode data is read and written as :class:`bytes` "
392392
"objects. You can not specify *encoding* when opening file in binary mode."
393393
msgstr""
394+
"通常、ファイルはテキストモード (:dfn:`text mode`) で開かれ、特定の *エンコー"
395+
"ディング* でエンコードされたファイルに対して文字列を読み書きします。*エンコー"
396+
"ディング* が指定されなければ、デフォルトはプラットフォーム依存です(:func:"
397+
"`open` を参照してください)。UTF-8は現在の事実上の標準のため、異なるエンコー"
398+
"ディングを指定したい場合以外は ``encoding=\"utf-8\"`` の指定がおすすめです。"
399+
"モードに ``'b'`` をつけるとファイルを :dfn:`binary mode` で開きます。バイナ"
400+
"リーモードでのデータは :class:`bytes` オブジェクトで読み書きします。ファイル"
401+
"をバイナリーモードで開くときは *エンコーディング* は指定できません。"
394402

395403
#:../../tutorial/inputoutput.rst:323
396404
msgid""

‎tutorial/introduction.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ msgid ""
242242
"odd number of ``\\`` characters; see :ref:`the FAQ entry <faq-programming-"
243243
"raw-string-backslash>` for more information and workarounds."
244244
msgstr""
245+
"raw文字列には微妙な面があります: raw文字列は奇数個の``\\`` 文字では終了できま"
246+
"せん。詳細と解決方法については :ref:`the FAQ entry <faq-programming-raw-"
247+
"string-backslash>` を参照してください。 "
245248

246249
#:../../tutorial/introduction.rst:197
247250
msgid""

‎tutorial/modules.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ msgid ""
140140
"a module (outside any functions or classes), are added to the module's "
141141
"global namespace."
142142
msgstr""
143+
"モジュールは他のモジュールをインポートできます。:keyword:`import`文はモジュー"
144+
"ル(さらに言えばスクリプトでも)の先頭に置きますが、これは慣習であって必須で"
145+
"はありません。インポートされたモジュール名は、モジュールのトップレベル(関数"
146+
"やクラスの外)に書いてあれば、モジュールのグローバルな名前空間に置かれます。"
143147

144148
#:../../tutorial/modules.rst:91
145149
msgid""

‎whatsnew/3.10.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ msgstr ""
507507
msgid""
508508
"You can combine several literals in a single pattern using ``|`` (\"or\")::"
509509
msgstr""
510+
"複数のリテラルを``|`` (\"or\")を使用して組み合わせて1つのパターンにできます。"
510511

511512
#:../../whatsnew/3.10.rst:503
512513
msgid"Behavior without the wildcard"
@@ -569,6 +570,11 @@ msgid ""
569570
"\"y\"), the following patterns are all equivalent (and all bind the ``y`` "
570571
"attribute to the ``var`` variable)::"
571572
msgstr""
573+
"いくつかの組み込みクラスでは位置引数が使用でき、属性の順番を提供します(例: "
574+
"データクラス)。クラスの ``__match_args__`` 特殊属性でによって、パターンの中で"
575+
"属性の明確な位置を定義することもできます。(\"x\",\"y\")が設定された場合、以"
576+
"下のすべてのパターンは等価です(すべて属性 ``y`` が ``var`` 変数に関連づけられ"
577+
"ます)::"
572578

573579
#:../../whatsnew/3.10.rst:586
574580
msgid"Nested patterns"
@@ -607,6 +613,9 @@ msgid ""
607613
"guard is false, ``match`` goes on to try the next case block. Note that "
608614
"value capture happens before the guard is evaluated::"
609615
msgstr""
616+
"パターンに ``if`` 節を追加できます。これは\"ガード\" と呼ばれます。ガードが"
617+
"falseの場合、``match`` は次のcaseブロックの処理に移動します。ガードを評価する"
618+
"前に値が取り出されることに注意してください::"
610619

611620
#:../../whatsnew/3.10.rst:633
612621
msgid"Other Key Features"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp