8
8
# Osamu NAKAMURA, 2021
9
9
# Akira inamori <akira.inamori@tf-ebina.com>, 2021
10
10
# Tetsuo Koyama <tkoyama010@gmail.com>, 2022
11
+ # Arihiro TAKASE, 2023
11
12
#
12
13
#, fuzzy
13
14
msgid ""
14
15
msgstr ""
15
16
"Project-Id-Version : Python 3.11\n "
16
17
"Report-Msgid-Bugs-To : \n "
17
- "POT-Creation-Date : 2023-03-24 14:14 +0000\n "
18
+ "POT-Creation-Date : 2023-04-14 14:13 +0000\n "
18
19
"PO-Revision-Date : 2021-06-28 00:48+0000\n "
19
- "Last-Translator : Tetsuo Koyama <tkoyama010@gmail.com>, 2022 \n "
20
- "Language-Team : Japanese (https://www .transifex.com/python-doc/teams/5390/ "
20
+ "Last-Translator : Arihiro TAKASE, 2023 \n "
21
+ "Language-Team : Japanese (https://app .transifex.com/python-doc/teams/5390/ "
21
22
"ja/)\n "
22
23
"MIME-Version : 1.0\n "
23
24
"Content-Type : text/plain; charset=UTF-8\n "
@@ -41,6 +42,15 @@ msgid ""
41
42
"pointer, or ``-1`` if they return an integer (exception: the ``PyArg_*`` "
42
43
"functions return ``1`` for success and ``0`` for failure)."
43
44
msgstr ""
45
+ "この章で説明する関数を使うと、 Python の例外の処理や例外の送出ができるように"
46
+ "なります。 Python の例外処理の基本をいくらか理解することが大切です。例外は "
47
+ "POSIX :c:data:`errno` 変数にやや似た機能を果たします: 発生した中で最も新しい"
48
+ "エラーの (スレッド毎の) グローバルなインジケータがあります。実行に成功した場"
49
+ "合にはほとんどの C API 関数がこれをクリアしませんが、失敗したときにはエラーの"
50
+ "原因を示すために設定します。ほとんどの C API 関数はエラーインジケータも返し、"
51
+ "通常は関数がポインタを返すことになっている場合は ``NULL`` であり、関数が整数"
52
+ "を返す場合は ``-1`` です。(例外: ``PyArg_*`` 関数は実行に成功したときに "
53
+ "``1`` を返し、失敗したときに ``0`` を返します)."
44
54
45
55
#: ../../c-api/exceptions.rst:20
46
56
msgid ""
@@ -109,6 +119,11 @@ msgid ""
109
119
"printed and the Python process will exit with the error code specified by "
110
120
"the ``SystemExit`` instance."
111
121
msgstr ""
122
+ "標準のトレースバックを ``sys.stderr`` に出力し、エラーインジケータをクリアし"
123
+ "ます。\n"
124
+ "ただし、エラーが ``SystemExit`` **である場合を除いて** です。\n"
125
+ "その場合、トレースバックは出力されず、 Python プロセスは ``SystemExit`` イン"
126
+ "スタンスで指定されたエラーコードで終了します。"
112
127
113
128
#: ../../c-api/exceptions.rst:60
114
129
msgid ""
@@ -186,6 +201,10 @@ msgid ""
186
201
"count. The second argument is an error message; it is decoded from "
187
202
"``'utf-8'``."
188
203
msgstr ""
204
+ "これはエラーインジケータを設定するための最も一般的な方法です。第一引数は例外"
205
+ "の型を指定します。通常は標準例外の一つ、例えば :c:data:`PyExc_RuntimeError` "
206
+ "です。その参照カウントを増加させる必要はありません。第二引数はエラーメッセー"
207
+ "ジで、 ``'utf-8'`` からデコードされます。"
189
208
190
209
#: ../../c-api/exceptions.rst:108
191
210
msgid ""
@@ -292,6 +311,10 @@ msgid ""
292
311
"is given as a C string. *filename* is decoded from the :term:`filesystem "
293
312
"encoding and error handler`."
294
313
msgstr ""
314
+ ":c:func:`PyErr_SetFromErrnoWithFilenameObject` に似ていますが、ファイル名は "
315
+ "C 文字列として与えられます。\n"
316
+ "*filename* は :term:`ファイルシステムのエンコーディングとエラーハンドラ "
317
+ "<filesystem encoding and error handler>` でデコードされます。"
295
318
296
319
#: ../../c-api/exceptions.rst:191
297
320
msgid ""
@@ -305,6 +328,14 @@ msgid ""
305
328
"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always "
306
329
"returns ``NULL``."
307
330
msgstr ""
331
+ "これは :exc:`WindowsError` を発生させるために便利な関数です。 ``0`` の "
332
+ "*ierr* とともに呼び出された場合、 :c:func:`GetLastError` が返すエラーコードが"
333
+ "代りに使われます。 *ierr* あるいは :c:func:`GetLastError` によって与えられる"
334
+ "エラーコードのWindows用の説明を取り出すために、Win32関数 :c:func:"
335
+ "`FormatMessage` を呼び出します。それから、第一要素が *ierr* 値で第二要素が(:"
336
+ "c:func:`FormatMessage` から得られる) 対応するエラーメッセージであるタプルオブ"
337
+ "ジェクトを構成します。そして、 ``PyErr_SetObject(PyExc_WindowsError, "
338
+ "object)`` を呼び出します。この関数は常に ``NULL`` を返します。"
308
339
309
340
#: ../../c-api/exceptions.rst:200 ../../c-api/exceptions.rst:208
310
341
#: ../../c-api/exceptions.rst:217 ../../c-api/exceptions.rst:225
@@ -391,12 +422,17 @@ msgid ""
391
422
"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string "
392
423
"decoded from the :term:`filesystem encoding and error handler`."
393
424
msgstr ""
425
+ ":c:func:`PyErr_SyntaxLocationObject` と似ていますが、 *filename* は :term:`"
426
+ "ファイルシステムのエンコーディングとエラーハンドラ <filesystem encoding and "
427
+ "error handler>` でデコードされたバイト文字列です。"
394
428
395
429
#: ../../c-api/exceptions.rst:284
396
430
msgid ""
397
431
"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is "
398
432
"omitted."
399
433
msgstr ""
434
+ ":c:func:`PyErr_SyntaxLocationEx` と似ていますが、 *col_offset* 引数が除去され"
435
+ "ています。"
400
436
401
437
#: ../../c-api/exceptions.rst:290
402
438
msgid ""
@@ -489,13 +525,21 @@ msgid ""
489
525
"warn_explicit`; see there for more information. The *module* and *registry* "
490
526
"arguments may be set to ``NULL`` to get the default effect described there."
491
527
msgstr ""
528
+ "すべての警告の属性を明示的に制御した警告メッセージを出します。これは Python "
529
+ "関数 :func:`warnings.warn_explicit` の直接的なラッパーで、さらに情報を得るに"
530
+ "はそちらを参照してください。そこに説明されているデフォルトの効果を得るため"
531
+ "に、 *module* と *registry* 引数は ``NULL`` に設定することができます。"
492
532
493
533
#: ../../c-api/exceptions.rst:345
494
534
msgid ""
495
535
"Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and "
496
536
"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:"
497
537
"`filesystem encoding and error handler`."
498
538
msgstr ""
539
+ ":c:func:`PyErr_WarnExplicitObject` に似ていますが、 *message* と *module* が "
540
+ "UTF-8 エンコードされた文字列であるところが異なり、 *filename* は :term:`ファ"
541
+ "イルシステムのエンコーディングとエラーハンドラ <filesystem encoding and "
542
+ "error handler>` でデコードされます。"
499
543
500
544
#: ../../c-api/exceptions.rst:352
501
545
msgid ""
@@ -528,6 +572,11 @@ msgid ""
528
572
"do not own a reference to the return value, so you do not need to :c:func:"
529
573
"`Py_DECREF` it."
530
574
msgstr ""
575
+ "エラーインジケータが設定されているかテストします。設定されている場合は、例外"
576
+ "の *型* (``PyErr_Set*`` 関数の一つあるいは :c:func:`PyErr_Restore` への最も新"
577
+ "しい呼び出しに対する第一引数)を返します。設定されていない場合は ``NULL`` を返"
578
+ "します。あなたは戻り値への参照を持っていませんので、それに :c:func:"
579
+ "`Py_DECREF` する必要はありません。"
531
580
532
581
#: ../../c-api/exceptions.rst:378
533
582
msgid "The caller must hold the GIL."
@@ -666,6 +715,10 @@ msgid ""
666
715
"state temporarily. Use :c:func:`PyErr_SetHandledException` to restore or "
667
716
"clear the exception state."
668
717
msgstr ""
718
+ "この関数は、通常は例外を扱うコードでは使用されません。正確に言うと、これは例"
719
+ "外の状態を一時的に保存し、元に戻す必要があるコードで使用することができます。"
720
+ "例外の状態を元に戻す、もしくはクリアするには :c:func:"
721
+ "`PyErr_SetHandledException` を使ってください。"
669
722
670
723
#: ../../c-api/exceptions.rst:481
671
724
msgid ""
@@ -681,6 +734,10 @@ msgid ""
681
734
"state temporarily. Use :c:func:`PyErr_GetHandledException` to get the "
682
735
"exception state."
683
736
msgstr ""
737
+ "この関数は、通常は例外を扱うコードでは使用されません。正確に言うと、これは例"
738
+ "外の状態を一時的に保存し、元に戻す必要があるコードで使用することができます。"
739
+ "例外の状態を取得するには :c:func:`PyErr_GetHandledException` を使ってくださ"
740
+ "い。"
684
741
685
742
#: ../../c-api/exceptions.rst:497
686
743
msgid ""
@@ -793,6 +850,9 @@ msgid ""
793
850
"`PyErr_CheckSignals` is called, the Python signal handler for the given "
794
851
"signal number will be called."
795
852
msgstr ""
853
+ "シグナルが到達した効果をシミュレートします。\n"
854
+ "次に :c:func:`PyErr_CheckSignals` が呼ばれたとき、与えられたシグナル番号用の "
855
+ "Python のシグナルハンドラが呼び出されます。"
796
856
797
857
#: ../../c-api/exceptions.rst:599
798
858
msgid ""
@@ -807,6 +867,8 @@ msgid ""
807
867
"If the given signal isn't handled by Python (it was set to :data:`signal."
808
868
"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored."
809
869
msgstr ""
870
+ "与えられたシグナルが Python に対処されなかった (:data:`signal.SIG_DFL` また"
871
+ "は :data:`signal.SIG_IGN` に設定されていた) 場合、無視されます。"
810
872
811
873
#: ../../c-api/exceptions.rst:607
812
874
msgid ""
@@ -1081,6 +1143,9 @@ msgid ""
1081
1143
"to be concatenated to the :exc:`RecursionError` message caused by the "
1082
1144
"recursion depth limit."
1083
1145
msgstr ""
1146
+ "*where* は ``\" in instance check\" `` のような UTF-8 エンコードされた文字列に"
1147
+ "して、再帰の深さの限界に達したことで送出される :exc:`RecursionError` のメッ"
1148
+ "セージに連結できるようにすべきです。"
1084
1149
1085
1150
#: ../../c-api/exceptions.rst:803 ../../c-api/exceptions.rst:811
1086
1151
msgid "This function is now also available in the limited API."
@@ -1165,6 +1230,9 @@ msgid ""
1165
1230
"c:expr:`PyObject*`; they are all class objects. For completeness, here are "
1166
1231
"all the variables:"
1167
1232
msgstr ""
1233
+ "``PyExc_`` の後ろにPythonの例外名が続く名前をもつグローバル変数として、すべて"
1234
+ "の標準Python例外が利用可能です。これらは型 :c:expr:`PyObject*` を持ち、すべて"
1235
+ "クラスオブジェクトです。完璧を期するために、すべての変数を以下に列挙します:"
1168
1236
1169
1237
#: ../../c-api/exceptions.rst:910 ../../c-api/exceptions.rst:1043
1170
1238
#: ../../c-api/exceptions.rst:1088
@@ -1690,6 +1758,10 @@ msgid ""
1690
1758
"the type :c:expr:`PyObject*`; they are all class objects. For completeness, "
1691
1759
"here are all the variables:"
1692
1760
msgstr ""
1761
+ "``PyExc_`` の後ろにPythonの例外名が続く名前をもつグローバル変数として、すべて"
1762
+ "の標準Python警告カテゴリが利用可能です。これらは型 :c:expr:`PyObject*` を持"
1763
+ "ち、すべてクラスオブジェクトです。完璧を期するために、すべての変数を以下に列"
1764
+ "挙します:"
1693
1765
1694
1766
#: ../../c-api/exceptions.rst:1090
1695
1767
msgid ":c:data:`PyExc_Warning`"
0 commit comments