@@ -18,7 +18,7 @@ msgid ""
18
18
msgstr ""
19
19
"Project-Id-Version : Python 3.7\n "
20
20
"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 "
22
22
"PO-Revision-Date : 2017-02-16 23:38+0000\n "
23
23
"Last-Translator : tomo, 2019\n "
24
24
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -1585,11 +1585,43 @@ msgstr ""
1585
1585
":exc:`ModuleNotFoundError` を送出するだけで十分です。 ``None`` "
1586
1586
"を返すのはメタパスの走査を続けるべきであることを意味しますが、例外を送出するとすぐに走査を打ち切ります。"
1587
1587
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
1589
1621
msgid "Special considerations for __main__"
1590
1622
msgstr "__main__ に対する特別な考慮"
1591
1623
1592
- #: ../../reference/import.rst:928
1624
+ #: ../../reference/import.rst:968
1593
1625
msgid ""
1594
1626
"The :mod:`__main__` module is a special case relative to Python's import "
1595
1627
"system. As noted :ref:`elsewhere <programs>`, the ``__main__`` module is "
@@ -1605,19 +1637,19 @@ msgstr ""
1605
1637
"は厳密にはビルトインのモジュールとしての資格を持っていません。これは、 ``__main__`` "
1606
1638
"が初期化される方法がインタプリタが起動されるときのフラグやその他のオプションに依存するためです。"
1607
1639
1608
- #: ../../reference/import.rst:939
1640
+ #: ../../reference/import.rst:979
1609
1641
msgid "__main__.__spec__"
1610
1642
msgstr "__main__.__spec__"
1611
1643
1612
- #: ../../reference/import.rst:941
1644
+ #: ../../reference/import.rst:981
1613
1645
msgid ""
1614
1646
"Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets "
1615
1647
"set appropriately or to ``None``."
1616
1648
msgstr ""
1617
1649
":mod:`__main__` がどのように初期化されるかに依存して、 ``__main__.__spec__`` は適切に設定されることもあれば "
1618
1650
"``None`` になることもあります。"
1619
1651
1620
- #: ../../reference/import.rst:944
1652
+ #: ../../reference/import.rst:984
1621
1653
msgid ""
1622
1654
"When Python is started with the :option:`-m` option, ``__spec__`` is set to "
1623
1655
"the module spec of the corresponding module or package. ``__spec__`` is also"
@@ -1629,7 +1661,7 @@ msgstr ""
1629
1661
" エントリを実行する処理の一部として ``__main__`` モジュールがロードされる場合にも ``__spec__`` が生成 (populate)"
1630
1662
" されます。"
1631
1663
1632
- #: ../../reference/import.rst:949
1664
+ #: ../../reference/import.rst:989
1633
1665
msgid ""
1634
1666
"In :ref:`the remaining cases <using-on-interface-options>` "
1635
1667
"``__main__.__spec__`` is set to ``None``, as the code used to populate the "
@@ -1639,23 +1671,23 @@ msgstr ""
1639
1671
"``None`` に設定されます。これは、 :mod:`__main__` を生成 (populate) "
1640
1672
"するために使われたコードがインポート可能なモジュールと直接一致していないためです:"
1641
1673
1642
- #: ../../reference/import.rst:953
1674
+ #: ../../reference/import.rst:993
1643
1675
msgid "interactive prompt"
1644
1676
msgstr "対話プロンプト"
1645
1677
1646
- #: ../../reference/import.rst:954
1678
+ #: ../../reference/import.rst:994
1647
1679
msgid ":option:`-c` option"
1648
1680
msgstr ":option:`-c` オプション"
1649
1681
1650
- #: ../../reference/import.rst:955
1682
+ #: ../../reference/import.rst:995
1651
1683
msgid "running from stdin"
1652
1684
msgstr "stdin から起動された場合"
1653
1685
1654
- #: ../../reference/import.rst:956
1686
+ #: ../../reference/import.rst:996
1655
1687
msgid "running directly from a source or bytecode file"
1656
1688
msgstr "ソースファイルやバイトコードファイルから直接起動された場合"
1657
1689
1658
- #: ../../reference/import.rst:958
1690
+ #: ../../reference/import.rst:998
1659
1691
msgid ""
1660
1692
"Note that ``__main__.__spec__`` is always ``None`` in the last case, *even "
1661
1693
"if* the file could technically be imported directly as a module instead. Use"
@@ -1666,7 +1698,7 @@ msgstr ""
1666
1698
"``None`` になることに注意してください。もし :mod:`__main__` において有効なモジュールメタデータが必要なら "
1667
1699
":option:`-m` スイッチを使ってください。"
1668
1700
1669
- #: ../../reference/import.rst:963
1701
+ #: ../../reference/import.rst:1003
1670
1702
msgid ""
1671
1703
"Note also that even when ``__main__`` corresponds with an importable module "
1672
1704
"and ``__main__.__spec__`` is set accordingly, they're still considered "
@@ -1679,15 +1711,15 @@ msgstr ""
1679
1711
"__name__ == \" __main__\" :`` チェックによって保証されるブロックは、 ``__main__`` 名前空間を生成 "
1680
1712
"(populate) するためにモジュールが使用される時にだけ実行され、通常のインポート時には実行されない、という事実に起因しています。"
1681
1713
1682
- #: ../../reference/import.rst:971
1714
+ #: ../../reference/import.rst:1011
1683
1715
msgid "Open issues"
1684
1716
msgstr "取り掛かり中の問題"
1685
1717
1686
- #: ../../reference/import.rst:973
1718
+ #: ../../reference/import.rst:1013
1687
1719
msgid "XXX It would be really nice to have a diagram."
1688
1720
msgstr "XXX 図があるととても良い。"
1689
1721
1690
- #: ../../reference/import.rst:975
1722
+ #: ../../reference/import.rst:1015
1691
1723
msgid ""
1692
1724
"XXX * (import_machinery.rst) how about a section devoted just to the "
1693
1725
"attributes of modules and packages, perhaps expanding upon or supplanting "
@@ -1696,31 +1728,31 @@ msgstr ""
1696
1728
"XXX * (import_machinery.rst) モジュールとパッケージの属性のみに紙面を割いた節を設けるのは何如でしょうか? "
1697
1729
"もしかしたらデータモデルについての言語リファレンスのページにある関係する内容を拡張したり、置き換えるようなものになるかもしれません。"
1698
1730
1699
- #: ../../reference/import.rst:979
1731
+ #: ../../reference/import.rst:1019
1700
1732
msgid ""
1701
1733
"XXX runpy, pkgutil, et al in the library manual should all get \" See Also\" "
1702
1734
"links at the top pointing to the new import system section."
1703
1735
msgstr ""
1704
1736
"XXX ライブラリマニュアルの runpy や pkgutil の解説の先頭すべてに、\" こちらも参照 (See Also)\" "
1705
1737
"という、この新しいインポートシステムの節へのリンクを置くべき。"
1706
1738
1707
- #: ../../reference/import.rst:982
1739
+ #: ../../reference/import.rst:1022
1708
1740
msgid ""
1709
1741
"XXX Add more explanation regarding the different ways in which ``__main__`` "
1710
1742
"is initialized?"
1711
1743
msgstr "XXX ``__main__`` が初期化される様々な方法についてより多くの説明を追加する?"
1712
1744
1713
- #: ../../reference/import.rst:985
1745
+ #: ../../reference/import.rst:1025
1714
1746
msgid ""
1715
1747
"XXX Add more info on ``__main__`` quirks/pitfalls (i.e. copy from "
1716
1748
":pep:`395`)."
1717
1749
msgstr "XXX ``__main__`` の特異性/落とし穴についてより多くの情報を追加する (つまり :pep:`395` からコピーする)"
1718
1750
1719
- #: ../../reference/import.rst:990
1751
+ #: ../../reference/import.rst:1030
1720
1752
msgid "References"
1721
1753
msgstr "参考資料"
1722
1754
1723
- #: ../../reference/import.rst:992
1755
+ #: ../../reference/import.rst:1032
1724
1756
msgid ""
1725
1757
"The import machinery has evolved considerably since Python's early days. "
1726
1758
"The original `specification for packages "
@@ -1730,14 +1762,14 @@ msgstr ""
1730
1762
"Python の初期の頃からすると、インポート機構は目覚ましい発展を遂げました。\n"
1731
1763
"一部細かいところがドキュメントが書かれたときから変わってはいますが、最初期の `パッケージの仕様 <https://www.python.org/doc/essays/packages/>`_ はまだ読むことができます。"
1732
1764
1733
- #: ../../reference/import.rst:997
1765
+ #: ../../reference/import.rst:1037
1734
1766
msgid ""
1735
1767
"The original specification for :data:`sys.meta_path` was :pep:`302`, with "
1736
1768
"subsequent extension in :pep:`420`."
1737
1769
msgstr ""
1738
1770
"オリジナルの :data:`sys.meta_path` の仕様は :pep:`302` で、その後継となる拡張が :pep:`420` です。"
1739
1771
1740
- #: ../../reference/import.rst:1000
1772
+ #: ../../reference/import.rst:1040
1741
1773
msgid ""
1742
1774
":pep:`420` introduced :term:`namespace packages <namespace package>` for "
1743
1775
"Python 3.3. :pep:`420` also introduced the :meth:`find_loader` protocol as "
@@ -1747,14 +1779,14 @@ msgstr ""
1747
1779
":pep:`420` はまた :meth:`find_module` に代わるものとして :meth:`find_loader` "
1748
1780
"プロトコルを導入しています。"
1749
1781
1750
- #: ../../reference/import.rst:1004
1782
+ #: ../../reference/import.rst:1044
1751
1783
msgid ""
1752
1784
":pep:`366` describes the addition of the ``__package__`` attribute for "
1753
1785
"explicit relative imports in main modules."
1754
1786
msgstr ""
1755
1787
":pep:`366` は、メインモジュールでの明示的な相対インポートのために追加した ``__package__`` 属性の解説をしています。"
1756
1788
1757
- #: ../../reference/import.rst:1007
1789
+ #: ../../reference/import.rst:1047
1758
1790
msgid ""
1759
1791
":pep:`328` introduced absolute and explicit relative imports and initially "
1760
1792
"proposed ``__name__`` for semantics :pep:`366` would eventually specify for "
@@ -1763,11 +1795,11 @@ msgstr ""
1763
1795
":pep:`328` は絶対インポート、明示的な相対インポート、および、当初 ``__name__`` で提案し、後に :pep:`366` が "
1764
1796
"``__package__`` で定めた仕様を導入しました。"
1765
1797
1766
- #: ../../reference/import.rst:1011
1798
+ #: ../../reference/import.rst:1051
1767
1799
msgid ":pep:`338` defines executing modules as scripts."
1768
1800
msgstr ":pep:`338` はモジュールをスクリプトとして実行するときの仕様を定めています。"
1769
1801
1770
- #: ../../reference/import.rst:1013
1802
+ #: ../../reference/import.rst:1053
1771
1803
msgid ""
1772
1804
":pep:`451` adds the encapsulation of per-module import state in spec "
1773
1805
"objects. It also off-loads most of the boilerplate responsibilities of "
@@ -1779,15 +1811,15 @@ msgstr ""
1779
1811
"は、モジュール仕様オブジェクトにおけるモジュール毎のインポート状態のカプセル化を追加しています。また、ローダーの定型的な責任のほとんどをインポート機構に肩代わりさせています。これらの変更により、インポートシステムのいくつかの"
1780
1812
" API が deprecate され、またファインダーとローダーには新しいメソッドが追加されました。"
1781
1813
1782
- #: ../../reference/import.rst:1020
1814
+ #: ../../reference/import.rst:1060
1783
1815
msgid "Footnotes"
1784
1816
msgstr "脚注"
1785
1817
1786
- #: ../../reference/import.rst:1021
1818
+ #: ../../reference/import.rst:1061
1787
1819
msgid "See :class:`types.ModuleType`."
1788
1820
msgstr ":class:`types.ModuleType` を参照してください。"
1789
1821
1790
- #: ../../reference/import.rst:1023
1822
+ #: ../../reference/import.rst:1063
1791
1823
msgid ""
1792
1824
"The importlib implementation avoids using the return value directly. "
1793
1825
"Instead, it gets the module object by looking the module name up in "
@@ -1799,7 +1831,7 @@ msgstr ""
1799
1831
"からモジュールオブジェクトを得ます。こうすることの間接的な効果は、インポートされたモジュールが :data:`sys.modules` "
1800
1832
"にいる自分自身を置き換えることがあるということです。これは実装依存の動作であり、他の Python 実装では保証されていない動作です。"
1801
1833
1802
- #: ../../reference/import.rst:1030
1834
+ #: ../../reference/import.rst:1070
1803
1835
msgid ""
1804
1836
"In legacy code, it is possible to find instances of "
1805
1837
":class:`imp.NullImporter` in the :data:`sys.path_importer_cache`. It is "
0 commit comments