@@ -66,6 +66,7 @@ msgstr ":keyword:`import` 文の言語リファレンス。"
66
66
msgid ""
67
67
"`Packages specification <https://www.python.org/doc/essays/packages/>`__"
68
68
msgstr ""
69
+ "`Packages specification <https://www.python.org/doc/essays/packages/>`__"
69
70
70
71
#: ../../library/importlib.rst:36
71
72
msgid ""
@@ -442,6 +443,10 @@ msgid ""
442
443
"that the finder may use to make a more educated guess about what spec to "
443
444
"return."
444
445
msgstr ""
446
+ "指定されたモジュールに対応する :term:`スペック <module spec>` を検索する抽象メソッド。もしこれがトップレベルのインポートなら、 "
447
+ "*path* は ``None`` です。そうでなければ、これはサブパッケージまたはモジュールのための検索で、 *path* は親パッケージの "
448
+ ":attr:`__path__` の値です。スペックが見つからなければ ``None`` が返されます。 ``target`` "
449
+ "は、渡されてきたならモジュールオブジェクトです。これはファインダーがどのようなスペックを返せばよいか推測するために使用します。"
445
450
446
451
#: ../../library/importlib.rst:276
447
452
msgid ""
@@ -509,6 +514,9 @@ msgid ""
509
514
"``None`` is returned. When passed in, ``target`` is a module object that "
510
515
"the finder may use to make a more educated guess about what spec to return."
511
516
msgstr ""
517
+ "指定されたモジュールに対応する :term:`スペック <module spec>` を検索する抽象メソッド。ファインダーは、割り当てられている "
518
+ ":term:`パス・エントリー <path entry>` 内のモジュールだけを検索します。スペックが見つからなければ ``None`` が返されます。"
519
+ " ``target`` は、渡されてきたならモジュールオブジェクトです。これはファインダーがどのようなスペックを返せばよいか推測するために使用します。"
512
520
513
521
#: ../../library/importlib.rst:326
514
522
msgid ""
@@ -586,10 +594,13 @@ msgid ""
586
594
"when ``exec_module()`` is called. When this method exists, "
587
595
":meth:`~importlib.abc.Loader.create_module` must be defined."
588
596
msgstr ""
597
+ "モジュールがインポートまたはリロードされる際に、そのモジュールをモジュール自身の名前空間の中で実行する抽象的なメソッド。\n"
598
+ "``exec_module()`` が呼ばれる時点で、モジュールはすでに初期設定されている必要があります。\n"
599
+ "このメソッドが存在するときは、 :meth:`~importlib.abc.Loader.create_module` の定義が必須です。"
589
600
590
601
#: ../../library/importlib.rst:387
591
602
msgid ":meth:`~importlib.abc.Loader.create_module` must also be defined."
592
- msgstr ""
603
+ msgstr ":meth:`~importlib.abc.Loader.create_module` の定義が必須となりました。 "
593
604
594
605
#: ../../library/importlib.rst:392
595
606
msgid ""
@@ -1126,7 +1137,7 @@ msgstr ""
1126
1137
msgid ""
1127
1138
"Only class methods are defined by this class to alleviate the need for "
1128
1139
"instantiation."
1129
- msgstr "インスタンス化を容易にするため、クラスメソッドだけがこのクラスによって定義されます 。"
1140
+ msgstr "インスタンス化の必要性を軽減するため、このクラスにはクラスメソッドだけが定義されています 。"
1130
1141
1131
1142
#: ../../library/importlib.rst:784
1132
1143
msgid ""
@@ -1151,12 +1162,16 @@ msgid ""
1151
1162
":term:`Finder` for modules declared in the Windows registry. This class "
1152
1163
"implements the :class:`importlib.abc.MetaPathFinder` ABC."
1153
<
10000
td data-grid-cell-id="diff-831d56267ff24a4a4bd1640c492575c2e1ec1bcd09e31580b990bfd1fdc090ef-1153-1164-1" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">1164
msgstr ""
1165
+ "Windows レジストリで宣言されたモジュールの :term:`Finder` です。このクラスは "
1166
+ ":class:`importlib.abc.MetaPathFinder` 抽象基底クラスを実装します。"
1154
1167
1155
1168
#: ../../library/importlib.rst:809
1156
1169
msgid ""
1157
1170
"Use :mod:`site` configuration instead. Future versions of Python may not "
1158
1171
"enable this finder by default."
1159
1172
msgstr ""
1173
+ "代わりに :mod:`site` の設定を使ってください。\n"
1174
+ "Python の将来のバージョンでは、デフォルトでこのファインダーが使えなくなるかもしれません。"
1160
1175
1161
1176
#: ../../library/importlib.rst:816
1162
1177
msgid ""
@@ -1327,7 +1342,7 @@ msgstr ""
1327
1342
1328
1343
#: ../../library/importlib.rst:949 ../../library/importlib.rst:992
1329
1344
msgid "Use :meth:`importlib.abc.Loader.exec_module` instead."
1330
- msgstr ""
1345
+ msgstr "代わりに :meth:`importlib.abc.Loader.exec_module` を使用してください。 "
1331
1346
1332
1347
#: ../../library/importlib.rst:954
1333
1348
msgid ""
@@ -1425,6 +1440,12 @@ msgid ""
1425
1440
"module's ``__path__`` at runtime, and this will not be automatically "
1426
1441
"reflected in ``__spec__.submodule_search_locations``."
1427
1442
msgstr ""
1443
+ "モジュールのインポートシステムに関する状態の仕様。\n"
1444
+ "これは通常はモジュールの ``__spec__`` 属性として公開されています。\n"
1445
+ "この後の解説では、モジュールオブジェクトから直接利用できる属性で、それぞれの仕様に対応しているものの名前が括弧書きで書かれています。\n"
1446
+ "例えば、 ``module.__spec__.origin == module.__file__`` です。\n"
1447
+ "ただし、属性の *値* はたいていは同一ですが、2つのオブジェクトどうしは同期されないため、異なっている可能性があることに注意してください。\n"
1448
+ "例えば、モジュールの ``__path__`` を実行時に更新できますが、 ``__spec__.submodule_search_locations`` に自動的には反映されません。"
1428
1449
1429
1450
#: ../../library/importlib.rst:1062
1430
1451
msgid "(``__name__``)"
@@ -1663,6 +1684,8 @@ msgid ""
1663
1684
"Create a new module based on **spec** and :meth:`spec.loader.create_module "
1664
1685
"<importlib.abc.Loader.create_module>`."
1665
1686
msgstr ""
1687
+ "**spec** と :meth:`spec.loader.create_module "
1688
+ "<importlib.abc.Loader.create_module>` に基づいて新しいモジュールを作ります。"
1666
1689
1667
1690
#: ../../library/importlib.rst:1228
1668
1691
msgid ""
@@ -1671,6 +1694,9 @@ msgid ""
1671
1694
"reset. Also, no :exc:`AttributeError` will be raised if triggered while "
1672
1695
"accessing **spec** or setting an attribute on the module."
1673
1696
msgstr ""
1697
+ ":meth:`spec.loader.create_module <importlib.abc.Loader.create_module>` が "
1698
+ "``None`` を返さない場合は、既に存在するどの属性もリセットされません。また、 **spec** "
1699
+ "にアクセスしたり属性をモジュールに設定したりする際に :exc:`AttributeError` 例外が起きても例外は送出されません。"
1674
1700
1675
1701
#: ../../library/importlib.rst:1233
1676
1702
msgid ""
@@ -1849,36 +1875,38 @@ msgstr "使用例"
1849
1875
1850
1876
#: ../../library/importlib.rst:1369
1851
1877
msgid "Importing programmatically"
1852
- msgstr ""
1878
+ msgstr "プログラムからのインポート "
1853
1879
1854
1880
#: ../../library/importlib.rst:1371
1855
1881
msgid ""
1856
1882
"To programmatically import a module, use :func:`importlib.import_module`. ::"
1857
- msgstr ""
1883
+ msgstr "プログラムからモジュールをインポートするには、 :func:`importlib.import_module` を使ってください。 :: "
1858
1884
1859
1885
#: ../../library/importlib.rst:1380
1860
1886
msgid "Checking if a module can be imported"
1861
- msgstr ""
1887
+ msgstr "モジュールがインポートできるか確認する "
1862
1888
1863
1889
#: ../../library/importlib.rst:1382
1864
1890
msgid ""
1865
1891
"If you need to find out if a module can be imported without actually doing "
1866
1892
"the import, then you should use :func:`importlib.util.find_spec`. ::"
1867
1893
msgstr ""
1894
+ "インポートを実際に行わずに、あるモジュールがインポートできるかを知る必要がある場合は、 :func:`importlib.util.find_spec`"
1895
+ " を使ってください。 ::"
1868
1896
1869
1897
#: ../../library/importlib.rst:1404
1870
1898
msgid "Importing a source file directly"
1871
- msgstr ""
1899
+ msgstr "ソースファイルから直接インポートする "
1872
1900
1873
1901
#: ../../library/importlib.rst:1406
1874
1902
msgid ""
1875
1903
"To import a Python source file directly, use the following recipe (Python "
1876
1904
"3.4 and newer only)::"
1877
- msgstr ""
1905
+ msgstr "Python のソースファイルから直接インポートするには、次のレシピを使ってください (Python 3.4 以降のみ):: "
1878
1906
1879
1907
#: ../../library/importlib.rst:1426
1880
1908
msgid "Setting up an importer"
1881
- msgstr ""
1909
+ msgstr "インポーターのセットアップ "
1882
1910
1883
1911
#: ../../library/importlib.rst:1428
1884
1912
msgid ""
0 commit comments