@@ -18,7 +18,7 @@ msgid ""
1818msgstr ""
1919"Project-Id-Version : Python 3.7\n "
2020"Report-Msgid-Bugs-To : \n "
21- "POT-Creation-Date : 2019-01-01 10:14 +0900\n "
21+ "POT-Creation-Date : 2019-04-25 11:16 +0900\n "
2222"PO-Revision-Date : 2017-02-16 23:38+0000\n "
2323"Last-Translator : tomo, 2019\n "
2424"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -1585,11 +1585,43 @@ msgstr ""
15851585":exc:`ModuleNotFoundError` を送出するだけで十分です。 ``None`` "
15861586"を返すのはメタパスの走査を続けるべきであることを意味しますが、例外を送出するとすぐに走査を打ち切ります。"
15871587
1588- #: ../../reference/import.rst:926
1588+ #: ../../reference/import.rst:927
1589+ msgid "Package Relative Imports"
1590+ msgstr ""
1591+
1592+ #: ../../reference/import.rst:929
1593+ msgid ""
1594+ "Relative imports use leading dots. A single leading dot indicates a relative"
1595+ " import, starting with the current package. Two or more leading dots "
1596+ "indicate a relative import to the parent(s) of the current package, one "
1597+ "level per dot after the first. For example, given the following package "
1598+ "layout::"
1599+ msgstr ""
1600+
1601+ #: ../../reference/import.rst:945
1602+ msgid ""
1603+ "In either ``subpackage1/moduleX.py`` or ``subpackage1/__init__.py``, the "
1604+ "following are valid relative imports::"
1605+ msgstr ""
1606+
1607+ #: ../../reference/import.rst:955
1608+ msgid ""
1609+ "Absolute imports may use either the ``import <>`` or ``from <> import <>`` "
1610+ "syntax, but relative imports may only use the second form; the reason for "
1611+ "this is that::"
1612+ msgstr ""
1613+
1614+ #: ../../reference/import.rst:961
1615+ msgid ""
1616+ "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a "
1617+ "valid expression."
1618+ msgstr ""
1619+
1620+ #: ../../reference/import.rst:966
15891621msgid "Special considerations for __main__"
15901622msgstr "__main__ に対する特別な考慮"
15911623
1592- #: ../../reference/import.rst:928
1624+ #: ../../reference/import.rst:968
15931625msgid ""
15941626"The :mod:`__main__` module is a special case relative to Python's import "
15951627"system. As noted :ref:`elsewhere <programs>`, the ``__main__`` module is "
@@ -1605,19 +1637,19 @@ msgstr ""
16051637"は厳密にはビルトインのモジュールとしての資格を持っていません。これは、 ``__main__`` "
16061638"が初期化される方法がインタプリタが起動されるときのフラグやその他のオプションに依存するためです。"
16071639
1608- #: ../../reference/import.rst:939
1640+ #: ../../reference/import.rst:979
16091641msgid "__main__.__spec__"
16101642msgstr "__main__.__spec__"
16111643
1612- #: ../../reference/import.rst:941
1644+ #: ../../reference/import.rst:981
16131645msgid ""
16141646"Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets "
16151647"set appropriately or to ``None``."
16161648msgstr ""
16171649":mod:`__main__` がどのように初期化されるかに依存して、 ``__main__.__spec__`` は適切に設定されることもあれば "
16181650"``None`` になることもあります。"
16191651
1620- #: ../../reference/import.rst:944
1652+ #: ../../reference/import.rst:984
16211653msgid ""
16221654"When Python is started with the :option:`-m` option, ``__spec__`` is set to "
16231655"the module spec of the corresponding module or package. ``__spec__`` is also"
@@ -1629,7 +1661,7 @@ msgstr ""
16291661" エントリを実行する処理の一部として ``__main__`` モジュールがロードされる場合にも ``__spec__`` が生成 (populate)"
16301662" されます。"
16311663
1632- #: ../../reference/import.rst:949
1664+ #: ../../reference/import.rst:989
16331665msgid ""
16341666"In :ref:`the remaining cases <using-on-interface-options>` "
16351667"``__main__.__spec__`` is set to ``None``, as the code used to populate the "
@@ -1639,23 +1671,23 @@ msgstr ""
16391671"``None`` に設定されます。これは、 :mod:`__main__` を生成 (populate) "
16401672"するために使われたコードがインポート可能なモジュールと直接一致していないためです:"
16411673
1642- #: ../../reference/import.rst:953
1674+ #: ../../reference/import.rst:993
16431675msgid "interactive prompt"
16441676msgstr "対話プロンプト"
16451677
1646- #: ../../reference/import.rst:954
1678+ #: ../../reference/import.rst:994
16471679msgid ":option:`-c` option"
16481680msgstr ":option:`-c` オプション"
16491681
1650- #: ../../reference/import.rst:955
1682+ #: ../../reference/import.rst:995
16511683msgid "running from stdin"
16521684msgstr "stdin から起動された場合"
16531685
1654- #: ../../reference/import.rst:956
1686+ #: ../../reference/import.rst:996
16551687msgid "running directly from a source or bytecode file"
16561688msgstr "ソースファイルやバイトコードファイルから直接起動された場合"
16571689
1658- #: ../../reference/import.rst:958
1690+ #: ../../reference/import.rst:998
16591691msgid ""
16601692"Note that ``__main__.__spec__`` is always ``None`` in the last case, *even "
16611693"if* the file could technically be imported directly as a module instead. Use"
@@ -1666,7 +1698,7 @@ msgstr ""
16661698"``None`` になることに注意してください。もし :mod:`__main__` において有効なモジュールメタデータが必要なら "
16671699":option:`-m` スイッチを使ってください。"
16681700
1669- #: ../../reference/import.rst:963
1701+ #: ../../reference/import.rst:1003
16701702msgid ""
16711703"Note also that even when ``__main__`` corresponds with an importable module "
16721704"and ``__main__.__spec__`` is set accordingly, they're still considered "
@@ -1679,15 +1711,15 @@ msgstr ""
16791711"__name__ == \" __main__\" :`` チェックによって保証されるブロックは、 ``__main__`` 名前空間を生成 "
16801712"(populate) するためにモジュールが使用される時にだけ実行され、通常のインポート時には実行されない、という事実に起因しています。"
16811713
1682- #: ../../reference/import.rst:971
1714+ #: ../../reference/import.rst:1011
16831715msgid "Open issues"
16841716msgstr "取り掛かり中の問題"
16851717
1686- #: ../../reference/import.rst:973
1718+ #: ../../reference/import.rst:1013
16871719msgid "XXX It would be really nice to have a diagram."
16881720msgstr "XXX 図があるととても良い。"
16891721
1690- #: ../../reference/import.rst:975
1722+ #: ../../reference/import.rst:1015
16911723msgid ""
16921724"XXX * (import_machinery.rst) how about a section devoted just to the "
16931725"attributes of modules and packages, perhaps expanding upon or supplanting "
@@ -1696,31 +1728,31 @@ msgstr ""
16961728"XXX * (import_machinery.rst) モジュールとパッケージの属性のみに紙面を割いた節を設けるのは何如でしょうか? "
16971729"もしかしたらデータモデルについての言語リファレンスのページにある関係する内容を拡張したり、置き換えるようなものになるかもしれません。"
16981730
1699- #: ../../reference/import.rst:979
1731+ #: ../../reference/import.rst:1019
17001732msgid ""
17011733"XXX runpy, pkgutil, et al in the library manual should all get \" See Also\" "
17021734"links at the top pointing to the new import system section."
17031735msgstr ""
17041736"XXX ライブラリマニュアルの runpy や pkgutil の解説の先頭すべてに、\" こちらも参照 (See Also)\" "
17051737"という、この新しいインポートシステムの節へのリンクを置くべき。"
17061738
1707- #: ../../reference/import.rst:982
1739+ #: ../../reference/import.rst:1022
17081740msgid ""
17091741"XXX Add more explanation regarding the different ways in which ``__main__`` "
17101742"is initialized?"
17111743msgstr "XXX ``__main__`` が初期化される様々な方法についてより多くの説明を追加する?"
17121744
1713- #: ../../reference/import.rst:985
1745+ #: ../../reference/import.rst:1025
17141746msgid ""
17151747"XXX Add more info on ``__main__`` quirks/pitfalls (i.e. copy from "
17161748":pep:`395`)."
17171749msgstr "XXX ``__main__`` の特異性/落とし穴についてより多くの情報を追加する (つまり :pep:`395` からコピーする)"
17181750
1719- #: ../../reference/import.rst:990
1751+ #: ../../reference/import.rst:1030
17201752msgid "References"
17211753msgstr "参考資料"
17221754
1723- #: ../../reference/import.rst:992
1755+ #: ../../reference/import.rst:1032
17241756msgid ""
17251757"The import machinery has evolved considerably since Python's early days. "
17261758"The original `specification for packages "
@@ -1730,14 +1762,14 @@ msgstr ""
17301762"Python の初期の頃からすると、インポート機構は目覚ましい発展を遂げました。\n"
17311763"一部細かいところがドキュメントが書かれたときから変わってはいますが、最初期の `パッケージの仕様 <https://www.python.org/doc/essays/packages/>`_ はまだ読むことができます。"
17321764
1733- #: ../../reference/import.rst:997
1765+ #: ../../reference/import.rst:1037
17341766msgid ""
17351767"The original specification for :data:`sys.meta_path` was :pep:`302`, with "
17361768"subsequent extension in :pep:`420`."
17371769msgstr ""
17381770"オリジナルの :data:`sys.meta_path` の仕様は :pep:`302` で、その後継となる拡張が :pep:`420` です。"
17391771
1740- #: ../../reference/import.rst:1000
1772+ #: ../../reference/import.rst:1040
17411773msgid ""
17421774":pep:`420` introduced :term:`namespace packages <namespace package>` for "
17431775"Python 3.3. :pep:`420` also introduced the :meth:`find_loader` protocol as "
@@ -1747,14 +1779,14 @@ msgstr ""
17471779":pep:`420` はまた :meth:`find_module` に代わるものとして :meth:`find_loader` "
17481780"プロトコルを導入しています。"
17491781
1750- #: ../../reference/import.rst:1004
1782+ #: ../../reference/import.rst:1044
17511783msgid ""
17521784":pep:`366` describes the addition of the ``__package__`` attribute for "
17531785"explicit relative imports in main modules."
17541786msgstr ""
17551787":pep:`366` は、メインモジュールでの明示的な相対インポートのために追加した ``__package__`` 属性の解説をしています。"
17561788
1757- #: ../../reference/import.rst:1007
1789+ #: ../../reference/import.rst:1047
17581790msgid ""
17591791":pep:`328` introduced absolute and explicit relative imports and initially "
17601792"proposed ``__name__`` for semantics :pep:`366` would eventually specify for "
@@ -1763,11 +1795,11 @@ msgstr ""
17631795":pep:`328` は絶対インポート、明示的な相対インポート、および、当初 ``__name__`` で提案し、後に :pep:`366` が "
17641796"``__package__`` で定めた仕様を導入しました。"
17651797
1766- #: ../../reference/import.rst:1011
1798+ #: ../../reference/import.rst:1051
17671799msgid ":pep:`338` defines executing modules as scripts."
17681800msgstr ":pep:`338` はモジュールをスクリプトとして実行するときの仕様を定めています。"
17691801
1770- #: ../../reference/import.rst:1013
1802+ #: ../../reference/import.rst:1053
17711803msgid ""
17721804":pep:`451` adds the encapsulation of per-module import state in spec "
17731805"objects. It also off-loads most of the boilerplate responsibilities of "
@@ -1779,15 +1811,15 @@ msgstr ""
17791811"は、モジュール仕様オブジェクトにおけるモジュール毎のインポート状態のカプセル化を追加しています。また、ローダーの定型的な責任のほとんどをインポート機構に肩代わりさせています。これらの変更により、インポートシステムのいくつかの"
17801812" API が deprecate され、またファインダーとローダーには新しいメソッドが追加されました。"
17811813
1782- #: ../../reference/import.rst:1020
1814+ #: ../../reference/import.rst:1060
17831815msgid "Footnotes"
17841816msgstr "脚注"
17851817
1786- #: ../../reference/import.rst:1021
1818+ #: ../../reference/import.rst:1061
17871819msgid "See :class:`types.ModuleType`."
17881820msgstr ":class:`types.ModuleType` を参照してください。"
17891821
1790- #: ../../reference/import.rst:1023
1822+ #: ../../reference/import.rst:1063
17911823msgid ""
17921824"The importlib implementation avoids using the return value directly. "
17931825"Instead, it gets the module object by looking the module name up in "
@@ -1799,7 +1831,7 @@ msgstr ""
17991831"からモジュールオブジェクトを得ます。こうすることの間接的な効果は、インポートされたモジュールが :data:`sys.modules` "
18001832"にいる自分自身を置き換えることがあるということです。これは実装依存の動作であり、他の Python 実装では保証されていない動作です。"
18011833
1802- #: ../../reference/import.rst:1030
1834+ #: ../../reference/import.rst:1070
18031835msgid ""
18041836"In legacy code, it is possible to find instances of "
18051837":class:`imp.NullImporter` in the :data:`sys.path_importer_cache`. It is "
0 commit comments