88msgstr ""
99"Project-Id-Version :Python 3.12\n "
1010"Report-Msgid-Bugs-To :\n "
11- "POT-Creation-Date :2023-12-07 00:03+0000\n "
11+ "POT-Creation-Date :2024-02-06 00:03+0000\n "
1212"PO-Revision-Date :2018-05-23 14:06+0000\n "
1313"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
1414"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -25,73 +25,60 @@ msgstr "引入模組"
2525
2626#: ../../c-api/import.rst:16
2727msgid ""
28- "This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, "
29- "leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set "
30- "to 0. When the *name* argument contains a dot (when it specifies a "
31- "submodule of a package), the *fromlist* argument is set to the list "
32- "``['*']`` so that the return value is the named module rather than the top-"
33- "level package containing it as would otherwise be the case. (Unfortunately, "
34- "this has an additional side effect when *name* in fact specifies a "
35- "subpackage instead of a submodule: the submodules specified in the package's "
36- "``__all__`` variable are loaded.) Return a new reference to the imported "
37- "module, or ``NULL`` with an exception set on failure. A failing import of a "
38- "module doesn't leave the module in :data:`sys.modules`."
28+ "This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:"
29+ "`const char *` as an argument instead of a :c:expr:`PyObject *`."
3930msgstr ""
4031
41- #: ../../c-api/import.rst:28 ../../c-api/import.rst:89
42- msgid "This function always uses absolute imports."
43- msgstr ""
44-
45- #: ../../c-api/import.rst:33
32+ #: ../../c-api/import.rst:21
4633msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`."
4734msgstr ""
4835
49- #: ../../c-api/import.rst:35
36+ #: ../../c-api/import.rst:23
5037msgid ""
5138"This function used to fail immediately when the import lock was held by "
5239"another thread. In Python 3.3 though, the locking scheme switched to per-"
5340"module locks for most purposes, so this function's special behaviour isn't "
5441"needed anymore."
5542msgstr ""
5643
57- #: ../../c-api/import.rst:46
44+ #: ../../c-api/import.rst:34
5845msgid ""
5946"Import a module. This is best described by referring to the built-in Python "
6047"function :func:`__import__`."
6148msgstr ""
6249
63- #: ../../c-api/import.rst:49 ../../c-api/import.rst:65
50+ #: ../../c-api/import.rst:37 ../../c-api/import.rst:53
6451msgid ""
6552"The return value is a new reference to the imported module or top-level "
6653"package, or ``NULL`` with an exception set on failure. Like for :func:"
6754"`__import__`, the return value when a submodule of a package was requested "
6855"is normally the top-level package, unless a non-empty *fromlist* was given."
6956msgstr ""
7057
71- #: ../../c-api/import.rst:55
58+ #: ../../c-api/import.rst:43
7259msgid ""
7360"Failing imports remove incomplete module objects, like with :c:func:"
7461"`PyImport_ImportModule`."
7562msgstr ""
7663
77- #: ../../c-api/import.rst:61
64+ #: ../../c-api/import.rst:49
7865msgid ""
7966"Import a module. This is best described by referring to the built-in Python "
8067"function :func:`__import__`, as the standard :func:`__import__` function "
8168"calls this function directly."
8269msgstr ""
8370
84- #: ../../c-api/import.rst:75
71+ #: ../../c-api/import.rst:63
8572msgid ""
8673"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a "
8774"UTF-8 encoded string instead of a Unicode object."
8875msgstr ""
8976
90- #: ../../c-api/import.rst:78
77+ #: ../../c-api/import.rst:66
9178msgid "Negative values for *level* are no longer accepted."
9279msgstr ""
9380
94- #: ../../c-api/import.rst:83
81+ #: ../../c-api/import.rst:71
9582msgid ""
9683"This is a higher-level interface that calls the current\" import hook "
9784"function\" (with an explicit *level* of 0, meaning absolute import). It "
@@ -100,21 +87,25 @@ msgid ""
10087"hooks are installed in the current environment."
10188msgstr ""
10289
103- #: ../../c-api/import.rst:94
90+ #: ../../c-api/import.rst:77
91+ msgid "This function always uses absolute imports."
92+ msgstr ""
93+
94+ #: ../../c-api/import.rst:82
10495msgid ""
10596"Reload a module. Return a new reference to the reloaded module, or ``NULL`` "
10697"with an exception set on failure (the module still exists in this case)."
10798msgstr ""
10899
109- #: ../../c-api/import.rst:100
100+ #: ../../c-api/import.rst:88
110101msgid ""
111102"Return the module object corresponding to a module name. The *name* "
112103"argument may be of the form ``package.module``. First check the modules "
113104"dictionary if there's one there, and if not, create a new one and insert it "
114105"in the modules dictionary. Return ``NULL`` with an exception set on failure."
115106msgstr ""
116107
117- #: ../../c-api/import.rst:107
108+ #: ../../c-api/import.rst:95
118109msgid ""
119110"This function does not load or import the module; if the module wasn't "
120111"already loaded, you will get an empty module object. Use :c:func:"
@@ -123,13 +114,13 @@ msgid ""
123114"already present."
124115msgstr ""
125116
126- #: ../../c-api/import.rst:117
117+ #: ../../c-api/import.rst:105
127118msgid ""
128119"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 "
129120"encoded string instead of a Unicode object."
130121msgstr ""
131122
132- #: ../../c-api/import.rst:125
123+ #: ../../c-api/import.rst:113
133124msgid ""
134125"Given a module name (possibly of the form ``package.module``) and a code "
135126"object read from a Python bytecode file or obtained from the built-in "
@@ -143,118 +134,118 @@ msgid ""
143134"to the module author's intents) state."
144135msgstr ""
145136
146- #: ../../c-api/import.rst:135
137+ #: ../../c-api/import.rst:123
147138msgid ""
148139"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set "
149140"already, with the appropriate values. The spec's loader will be set to the "
150141"module's ``__loader__`` (if set) and to an instance of :class:`~importlib."
151142"machinery.SourceFileLoader` otherwise."
152143msgstr ""
153144
154- #: ../../c-api/import.rst:140
145+ #: ../../c-api/import.rst:128
155146msgid ""
156147"The module's :attr:`__file__` attribute will be set to the code object's :"
157148"attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also "
158149"be set."
159150msgstr ""
160151
161- #: ../../c-api/import.rst:144
152+ #: ../../c-api/import.rst:132
162153msgid ""
163154"This function will reload the module if it was already imported. See :c:"
164155"func:`PyImport_ReloadModule` for the intended way to reload a module."
165156msgstr ""
166157
167- #: ../../c-api/import.rst:147
158+ #: ../../c-api/import.rst:135
168159msgid ""
169160"If *name* points to a dotted name of the form ``package.module``, any "
170161"package structures not already created will still not be created."
171162msgstr ""
172163
173- #: ../../c-api/import.rst:150
164+ #: ../../c-api/import.rst:138
174165msgid ""
175166"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:"
176167"`PyImport_ExecCodeModuleWithPathnames`."
177168msgstr ""
178169
179- #: ../../c-api/import.rst:153
170+ #: ../../c-api/import.rst:141
180171msgid ""
181172"The setting of :attr:`__cached__` and :attr:`__loader__` is deprecated. See :"
182173"class:`~importlib.machinery.ModuleSpec` for alternatives."
183174msgstr ""
184175
185- #: ../../c-api/import.rst:161
176+ #: ../../c-api/import.rst:149
186177msgid ""
187178"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute "
188179"of the module object is set to *pathname* if it is non-``NULL``."
189180msgstr ""
190181
191- #: ../../c-api/import.rst:164
182+ #: ../../c-api/import.rst:152
192183msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`."
193184msgstr "也請見 :c:func:`PyImport_ExecCodeModuleWithPathnames`\\ 。"
194185
195- #: ../../c-api/import.rst:169
186+ #: ../../c-api/import.rst:157
196187msgid ""
197188"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` "
198189"attribute of the module object is set to *cpathname* if it is non-``NULL``. "
199190"Of the three functions, this is the preferred one to use."
200191msgstr ""
201192
202- #: ../../c-api/import.rst:175
193+ #: ../../c-api/import.rst:163
203194msgid ""
204195"Setting :attr:`__cached__` is deprecated. See :class:`~importlib.machinery."
205196"ModuleSpec` for alternatives."
206197msgstr ""
207198
208- #: ../../c-api/import.rst:182
199+ #: ../../c-api/import.rst:170
209200msgid ""
210201"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and "
211202"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out "
212203"what the value for *pathname* should be from *cpathname* if the former is "
213204"set to ``NULL``."
214205msgstr ""
215206
216- #: ../../c-api/import.rst:188
207+ #: ../../c-api/import.rst:176
217208msgid ""
218209"Uses :func:`!imp.source_from_cache()` in calculating the source path if only "
219210"the bytecode path is provided."
220211msgstr ""
221212
222- #: ../../c-api/import.rst:191
213+ #: ../../c-api/import.rst:179
223214msgid "No longer uses the removed :mod:`!imp` module."
224215msgstr "不再使用已被移除的 :mod:`!imp` 模組。"
225216
226- #: ../../c-api/import.rst:197
217+ #: ../../c-api/import.rst:185
227218msgid ""
228219"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` "
229220"file). The magic number should be present in the first four bytes of the "
230221"bytecode file, in little-endian byte order. Returns ``-1`` on error."
231222msgstr ""
232223
233- #: ../../c-api/import.rst:201
224+ #: ../../c-api/import.rst:189
234225msgid "Return value of ``-1`` upon failure."
235226msgstr "當失敗時回傳 ``-1``。"
236227
237- #: ../../c-api/import.rst:207
228+ #: ../../c-api/import.rst:195
238229msgid ""
239230"Return the magic tag string for :pep:`3147` format Python bytecode file "
240231"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is "
241232"authoritative and should be used instead of this function."
242233msgstr ""
243234
244- #: ../../c-api/import.rst:215
235+ #: ../../c-api/import.rst:203
245236msgid ""
246237"Return the dictionary used for the module administration (a.k.a. ``sys."
247238"modules``). Note that this is a per-interpreter variable."
248239msgstr ""
249240
250- #: ../../c-api/import.rst:220
241+ #: ../../c-api/import.rst:208
251242msgid ""
252243"Return the already imported module with the given name. If the module has "
253244"not been imported yet then returns ``NULL`` but does not set an error. "
254245"Returns ``NULL`` and sets an error if the lookup failed."
255246msgstr ""
256247
257- #: ../../c-api/import.rst:228
248+ #: ../../c-api/import.rst:216
258249msgid ""
259250"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item "
260251"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` "
@@ -265,7 +256,7 @@ msgid ""
265256"path_importer_cache`. Return a new reference to the finder object."
266257msgstr ""
267258
268- #: ../../c-api/import.rst:239
259+ #: ../../c-api/import.rst:227
269260msgid ""
270261"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the "
271262"module is not found, and ``-1`` with an exception set if the initialization "
@@ -274,31 +265,31 @@ msgid ""
274265"the module if it was already imported.)"
275266msgstr ""
276267
277- #: ../../c-api/import.rst:247
268+ #: ../../c-api/import.rst:235
278269msgid "The ``__file__`` attribute is no longer set on the module."
279270msgstr ""
280271
281- #: ../../c-api/import.rst:253
272+ #: ../../c-api/import.rst:241
282273msgid ""
283274"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a "
284275"UTF-8 encoded string instead of a Unicode object."
285276msgstr ""
286277
287- #: ../../c-api/import.rst:261
278+ #: ../../c-api/import.rst:249
288279msgid ""
289280"This is the structure type definition for frozen module descriptors, as "
290281"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the "
291282"Python source distribution). Its definition, found in :file:`Include/import."
292283"h`, is::"
293284msgstr ""
294285
295- #: ../../c-api/import.rst:273
286+ #: ../../c-api/import.rst:261
296287msgid ""
297288"The new ``is_package`` field indicates whether the module is a package or "
298289"not. This replaces setting the ``size`` field to a negative value."
299290msgstr ""
300291
301- #: ../../c-api/import.rst:279
292+ #: ../../c-api/import.rst:267
302293msgid ""
303294"This pointer is initialized to point to an array of :c:struct:`_frozen` "
304295"records, terminated by one whose members are all ``NULL`` or zero. When a "
@@ -307,7 +298,7 @@ msgid ""
307298"frozen modules."
308299msgstr ""
309300
310- #: ../../c-api/import.rst:287
301+ #: ../../c-api/import.rst:275
311302msgid ""
312303"Add a single module to the existing table of built-in modules. This is a "
313304"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning "
@@ -317,19 +308,19 @@ msgid ""
317308"before :c:func:`Py_Initialize`."
318309msgstr ""
319310
320- #: ../../c-api/import.rst:297
311+ #: ../../c-api/import.rst:285
321312msgid ""
322313"Structure describing a single entry in the list of built-in modules. "
323314"Programs which embed Python may use an array of these structures in "
324315"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional "
325316"built-in modules. The structure consists of two members:"
326317msgstr ""
327318
328- #: ../../c-api/import.rst:305
319+ #: ../../c-api/import.rst:293
329320msgid "The module name, as an ASCII encoded string."
330321msgstr ""
331322
332- #: ../../c-api/import.rst:314
323+ #: ../../c-api/import.rst:302
333324msgid ""
334325"Add a collection of modules to the table of built-in modules. The *newtab* "
335326"array must end with a sentinel entry which contains ``NULL`` for the :c:"
@@ -340,7 +331,7 @@ msgid ""
340331"before :c:func:`Py_Initialize`."
341332msgstr ""
342333
343- #: ../../c-api/import.rst:321
334+ #: ../../c-api/import.rst:309
344335msgid ""
345336"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` "
346337"or :c:func:`PyImport_ExtendInittab` must be called before each Python "
@@ -363,18 +354,18 @@ msgstr "__all__(套件變數)"
363354msgid "modules (in module sys)"
364355msgstr "modules(sys 模組中)"
365356
366- #: ../../c-api/import.rst:44 ../../c-api/import.rst:123
357+ #: ../../c-api/import.rst:32 ../../c-api/import.rst:111
367358msgid "built-in function"
368359msgstr "built-in function(內建函式)"
369360
370- #: ../../c-api/import.rst:44
361+ #: ../../c-api/import.rst:32
371362msgid "__import__"
372363msgstr "__import__"
373364
374- #: ../../c-api/import.rst:123
365+ #: ../../c-api/import.rst:111
375366msgid "compile"
376367msgstr "compile(編譯)"
377368
378- #: ../../c-api/import.rst:259
369+ #: ../../c-api/import.rst:247
379370msgid "freeze utility"
380371msgstr "freeze utility(凍結工具)"