@@ -7,7 +7,7 @@ msgstr ""
77"Project-Id-Version :Python 3.13\n "
88"Report-Msgid-Bugs-To :\n "
99"POT-Creation-Date :2024-09-03 11:11+0800\n "
10- "PO-Revision-Date :2024-10-29 01:29 +0800\n "
10+ "PO-Revision-Date :2024-11-04 22:16 +0800\n "
1111"Last-Translator :Ken Cheng <ken71301@gmail.com>\n "
1212"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1313"tw)\n "
@@ -901,6 +901,11 @@ msgid ""
901901"``spam.foo``, ``spam`` will have an attribute ``foo`` which is bound to the "
902902"submodule. Let's say you have the following directory structure::"
903903msgstr ""
904+ "當使用任何機制(例如 ``importlib`` APIs,``import`` 或 ``import-from`` 陳述"
905+ "式,或內建的 ``__import__()``\\ )載入子模組時,會將子模組物件繫結到父模組的"
906+ "命名空間中。例如,如果套件 ``spam`` 有一個子模組 ``foo``,則在引入 ``spam."
907+ "foo`` 之後,``spam`` 將擁有一個名為 ``foo`` 的屬性,該屬性繫結到子模組。我們"
908+ "假設你有以下的目錄結構: ::"
904909
905910#: ../../reference/import.rst:493
906911msgid ""
@@ -914,7 +919,7 @@ msgstr ""
914919
915920#: ../../reference/import.rst:497
916921msgid "and ``spam/__init__.py`` has the following line in it::"
917- msgstr ""
922+ msgstr "並且 ``spam/__init__.py`` 中包含以下程式碼: :: "
918923
919924#: ../../reference/import.rst:499
920925msgid "from .foo import Foo"
@@ -925,6 +930,7 @@ msgid ""
925930"then executing the following puts name bindings for ``foo`` and ``Foo`` in "
926931"the ``spam`` module::"
927932msgstr ""
933+ "那麼執行以下程式碼會將 ``foo`` 和 ``Foo`` 的名稱繫結到 ``spam`` 模組中: ::"
928934
929935#: ../../reference/import.rst:504
930936msgid ""
@@ -948,6 +954,14 @@ msgid ""
948954"foo']`` (as you would after the above import), the latter must appear as the "
949955"``foo`` attribute of the former."
950956msgstr ""
957+ "鑑於 Python 相似的名稱繫結規則,這可能看起來有些出人意料,但這實際上是引入系"
958+ "統的一個基本特性。不變的是如果你擁有 ``sys.modules['spam']`` 和 ``sys."
959+ "modules['spam.foo']``(就像上述引入後那樣),那麼後者必須作為前者的 ``foo`` "
960+ "屬性出現。"
961+
962+ #: ../../reference/import.rst:517
963+ msgid "Module spec"
964+ msgstr "模組規格"
951965
952966#: ../../reference/import.rst:519
953967msgid "Module specs"
@@ -960,6 +974,9 @@ msgid ""
960974"modules. The purpose of a module's spec is to encapsulate this import-"
961975"related information on a per-module basis."
962976msgstr ""
977+ "引入機制在引入過程中使用有關每個模組的各種資訊,尤其是在載入之前。大多數資訊"
978+ "對所有模組來說都是通用的。模組規格的目的是以每個模組為基礎封裝這些與引入相關"
979+ "的資訊。"
963980
964981#: ../../reference/import.rst:526
965982msgid ""
@@ -969,6 +986,9 @@ msgid ""
969986"machinery to perform the boilerplate operations of loading, whereas without "
970987"a module spec the loader had that responsibility."
971988msgstr ""
989+ "在引入過程中使用規格允許在引入系統的各個組件之間傳遞狀態,例如在建立模組規格"
990+ "的尋檢器和執行該規格的載入器之間傳遞。最重要的是,這允許引入機制執行載入的樣"
991+ "板操作,而在沒有模組規格的情況下,這些操作則是載入器的責任。"
972992
973993#: ../../reference/import.rst:532
974994msgid ""
@@ -977,6 +997,8 @@ msgid ""
977997"interpreter startup <programs>`. The one exception is ``__main__``, where :"
978998"attr:`!__spec__` is :ref:`set to None in some cases <main_spec>`."
979999msgstr ""
1000+ "模組的規格以 ``__spec__`` 屬性的形式公開在模組物件上。有關模組規格內容的詳細"
1001+ "資訊,請參閱 :class:`~importlib.machinery.ModuleSpec`。"
9801002
9811003#: ../../reference/import.rst:538
9821004msgid ""