Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5724664

Browse files
committed
feat: to rst:600
fix: inconsistent_referencefix: inconsistent_reference
1 parent85fadd9 commit5724664

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

‎reference/import.po

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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-11-06 14:55+0800\n"
10+
"PO-Revision-Date:2024-12-11 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"
@@ -1007,7 +1007,7 @@ msgstr ""
10071007

10081008
#:../../reference/import.rst:546
10091009
msgid"__path__ attributes on modules"
1010-
msgstr""
1010+
msgstr"模組上的 __path__ 屬性"
10111011

10121012
#:../../reference/import.rst:548
10131013
msgid""
@@ -1016,6 +1016,9 @@ msgid ""
10161016
"submodules will be found. By definition, if a module has a :attr:`!__path__` "
10171017
"attribute, it is a :term:`package`."
10181018
msgstr""
1019+
":attr:`~module.__path__` 屬性應該是一個(可能為空的)\\ :term:`sequence`,其"
1020+
"包含列舉套件子模組位置的字串。根據定義,如果一個模組有 :attr:`!__path__` 屬"
1021+
"性,那麼它就是一個 :term:`package`。"
10191022

10201023
#:../../reference/import.rst:553
10211024
msgid""
@@ -1025,13 +1028,18 @@ msgid ""
10251028
"during import. However, :attr:`!__path__` is typically much more constrained "
10261029
"than :data:`!sys.path`."
10271030
msgstr""
1031+
"套件的 :attr:`~module.__path__` 屬性在引入其子套件時被使用。在引入機制中,其"
1032+
"功能與 :data:`sys.path` 類似,即提供在引入期間搜尋模組的位置串列。然而,:"
1033+
"attr:`!__path__` 通常比 :data:`!sys.path` 更受限制。"
10281034

10291035
#:../../reference/import.rst:560
10301036
msgid""
10311037
"The same rules used for :data:`sys.path` also apply to a package's :attr:`!"
10321038
"__path__`. :data:`sys.path_hooks` (described below) are consulted when "
10331039
"traversing a package's :attr:`!__path__`."
10341040
msgstr""
1041+
":data:`sys.path` 適用的規則同樣也適用於套件的 :attr:`!__path__`。 :data:`sys."
1042+
"path_hooks` 會在遍歷套件的 :attr:`!__path__` 時被參考(於後文詳述)。"
10351043

10361044
#:../../reference/import.rst:564
10371045
msgid""
@@ -1042,17 +1050,23 @@ msgid ""
10421050
"containing only :attr:`!__path__` manipulation code; the import machinery "
10431051
"automatically sets :attr:`!__path__` correctly for the namespace package."
10441052
msgstr""
1053+
"套件的 ``__init__.py`` 檔案可以設定或修改套件的 :attr:`~module.__path__` 屬"
1054+
"性,這通常是 :pep:`420` 之前實作命名空間套件的方式。隨著 :pep:`420` 的採用,"
1055+
"命名空間套件不再需要提供僅包含 :attr:`!__path__` 操作程式碼的 ``__init__."
1056+
"py`` 檔案;引入機制會自動為命名空間套件正確地設定 :attr:`!__path__`。"
10451057

10461058
#:../../reference/import.rst:573
10471059
msgid"Module reprs"
1048-
msgstr""
1060+
msgstr"模組的 reprs"
10491061

10501062
#:../../reference/import.rst:575
10511063
msgid""
10521064
"By default, all modules have a usable repr, however depending on the "
10531065
"attributes set above, and in the module's spec, you can more explicitly "
10541066
"control the repr of module objects."
10551067
msgstr""
1068+
"預設情況下,所有模組都有可用的 repr,然而,根據上述設定及模組規格中的屬性,你"
1069+
"可以更明確地控制模組物件的 repr。"
10561070

10571071
#:../../reference/import.rst:579
10581072
msgid""
@@ -1063,40 +1077,50 @@ msgid ""
10631077
"__file__``, and ``module.__loader__`` as input into the repr, with defaults "
10641078
"for whatever information is missing."
10651079
msgstr""
1080+
"如果模組具有規格(\\ ``__spec__``\\ ),引入機制將嘗試從規格中產生 repr。如果"
1081+
"失敗或沒有規格,引入系統將使用模組上可用的資訊製作一個預設的 repr。它會嘗試使"
1082+
"用 ``module.__name__``、``module.__file__`` 和 ``module.__loader__`` 作為 "
1083+
"repr 的輸入,並為缺少的資訊提供預設值。"
10661084

10671085
#:../../reference/import.rst:586
10681086
msgid"Here are the exact rules used:"
1069-
msgstr""
1087+
msgstr"以下是具體的使用規則:"
10701088

10711089
#:../../reference/import.rst:588
10721090
msgid""
10731091
"If the module has a ``__spec__`` attribute, the information in the spec is "
10741092
"used to generate the repr. The\"name\",\"loader\",\"origin\", and "
10751093
"\"has_location\" attributes are consulted."
10761094
msgstr""
1095+
"如果模組具有 ``__spec__`` 屬性,則使用規格中的資訊產生 repr。會參考 "
1096+
"\"name\"\"loader\"\"origin\"\"has_location\" 屬性。"
10771097

10781098
#:../../reference/import.rst:592
10791099
msgid""
10801100
"If the module has a ``__file__`` attribute, this is used as part of the "
10811101
"module's repr."
1082-
msgstr""
1102+
msgstr"如果模組具有 ``__file__`` 屬性,則會將其作為模組 repr 的一部分。"
10831103

10841104
#:../../reference/import.rst:595
10851105
msgid""
10861106
"If the module has no ``__file__`` but does have a ``__loader__`` that is not "
10871107
"``None``, then the loader's repr is used as part of the module's repr."
10881108
msgstr""
1109+
"如果模組沒有 ``__file__`` 但有一個不為 ``None`` 的 ``__loader__`` ,則會將載"
1110+
"入器的 repr 作為模組 repr 的一部分。"
10891111

10901112
#:../../reference/import.rst:598
10911113
msgid"Otherwise, just use the module's ``__name__`` in the repr."
1092-
msgstr""
1114+
msgstr"否則,在 repr 中只使用模組的 ``__name__``。"
10931115

10941116
#:../../reference/import.rst:600
10951117
msgid""
10961118
"Use of :meth:`!module_repr`, having been deprecated since Python 3.4, was "
10971119
"removed in Python 3.12 and is no longer called during the resolution of a "
10981120
"module's repr."
10991121
msgstr""
1122+
":meth:`!module_repr` 自 Python 3.4 起被棄用,並在 Python 3.12 中移除,且不會"
1123+
"在解析模組的 repr 時被呼叫。"
11001124

11011125
#:../../reference/import.rst:608
11021126
msgid"Cached bytecode invalidation"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp