8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.12\n "
10
10
"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 "
12
12
"PO-Revision-Date : 2018-05-23 14:06+0000\n "
13
13
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -25,73 +25,60 @@ msgstr "引入模組"
25
25
26
26
#: ../../c-api/import.rst:16
27
27
msgid ""
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 *`."
39
30
msgstr ""
40
31
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
46
33
msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`."
47
34
msgstr ""
48
35
49
- #: ../../c-api/import.rst:35
36
+ #: ../../c-api/import.rst:23
50
37
msgid ""
51
38
"This function used to fail immediately when the import lock was held by "
52
39
"another thread. In Python 3.3 though, the locking scheme switched to per-"
53
40
"module locks for most purposes, so this function's special behaviour isn't "
54
41
"needed anymore."
55
42
msgstr ""
56
43
57
- #: ../../c-api/import.rst:46
44
+ #: ../../c-api/import.rst:34
58
45
msgid ""
59
46
"Import a module. This is best described by referring to the built-in Python "
60
47
"function :func:`__import__`."
61
48
msgstr ""
62
49
63
- #: ../../c-api/import.rst:49 ../../c-api/import.rst:65
50
+ #: ../../c-api/import.rst:37 ../../c-api/import.rst:53
64
51
msgid ""
65
52
"The return value is a new reference to the imported module or top-level "
66
53
"package, or ``NULL`` with an exception set on failure. Like for :func:"
67
54
"`__import__`, the return value when a submodule of a package was requested "
68
55
"is normally the top-level package, unless a non-empty *fromlist* was given."
69
56
msgstr ""
70
57
71
- #: ../../c-api/import.rst:55
58
+ #: ../../c-api/import.rst:43
72
59
msgid ""
73
60
"Failing imports remove incomplete module objects, like with :c:func:"
74
61
"`PyImport_ImportModule`."
75
62
msgstr ""
76
63
77
- #: ../../c-api/import.rst:61
64
+ #: ../../c-api/import.rst:49
78
65
msgid ""
79
66
"Import a module. This is best described by referring to the built-in Python "
80
67
"function :func:`__import__`, as the standard :func:`__import__` function "
81
68
"calls this function directly."
82
69
msgstr ""
83
70
84
- #: ../../c-api/import.rst:75
71
+ #: ../../c-api/import.rst:63
85
72
msgid ""
86
73
"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a "
87
74
"UTF-8 encoded string instead of a Unicode object."
88
75
msgstr ""
89
76
90
- #: ../../c-api/import.rst:78
77
+ #: ../../c-api/import.rst:66
91
78
msgid "Negative values for *level* are no longer accepted."
92
79
msgstr ""
93
80
94
- #: ../../c-api/import.rst:83
81
+ #: ../../c-api/import.rst:71
95
82
msgid ""
96
83
"This is a higher-level interface that calls the current \" import hook "
97
84
"function\" (with an explicit *level* of 0, meaning absolute import). It "
@@ -100,21 +87,25 @@ msgid ""
100
87
"hooks are installed in the current environment."
101
88
msgstr ""
102
89
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
104
95
msgid ""
105
96
"Reload a module. Return a new reference to the reloaded module, or ``NULL`` "
106
97
"with an exception set on failure (the module still exists in this case)."
107
98
msgstr ""
108
99
109
- #: ../../c-api/import.rst:100
100
+ #: ../../c-api/import.rst:88
110
101
msgid ""
111
102
"Return the module object corresponding to a module name. The *name* "
112
103
"argument may be of the form ``package.module``. First check the modules "
113
104
"dictionary if there's one there, and if not, create a new one and insert it "
114
105
"in the modules dictionary. Return ``NULL`` with an exception set on failure."
115
106
msgstr ""
116
107
117
- #: ../../c-api/import.rst:107
108
+ #: ../../c-api/import.rst:95
118
109
msgid ""
119
110
"This function does not load or import the module; if the module wasn't "
120
111
"already loaded, you will get an empty module object. Use :c:func:"
@@ -123,13 +114,13 @@ msgid ""
123
114
"already present."
124
115
msgstr ""
125
116
126
- #: ../../c-api/import.rst:117
117
+ #: ../../c-api/import.rst:105
127
118
msgid ""
128
119
"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 "
129
120
"encoded string instead of a Unicode object."
130
121
msgstr ""
131
122
132
- #: ../../c-api/import.rst:125
123
+ #: ../../c-api/import.rst:113
133
124
msgid ""
134
125
"Given a module name (possibly of the form ``package.module``) and a code "
135
126
"object read from a Python bytecode file or obtained from the built-in "
@@ -143,118 +134,118 @@ msgid ""
143
134
"to the module author's intents) state."
144
135
msgstr ""
145
136
146
- #: ../../c-api/import.rst:135
137
+ #: ../../c-api/import.rst:123
147
138
msgid ""
148
139
"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set "
149
140
"already, with the appropriate values. The spec's loader will be set to the "
150
141
"module's ``__loader__`` (if set) and to an instance of :class:`~importlib."
151
142
"machinery.SourceFileLoader` otherwise."
152
143
msgstr ""
153
144
154
- #: ../../c-api/import.rst:140
145
+ #: ../../c-api/import.rst:128
155
146
msgid ""
156
147
"The module's :attr:`__file__` attribute will be set to the code object's :"
157
148
"attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also "
158
149
"be set."
159
150
msgstr ""
160
151
161
- #: ../../c-api/import.rst:144
152
+ #: ../../c-api/import.rst:132
162
153
msgid ""
163
154
"This function will reload the module if it was already imported. See :c:"
164
155
"func:`PyImport_ReloadModule` for the intended way to reload a module."
165
156
msgstr ""
166
157
167
- #: ../../c-api/import.rst:147
158
+ #: ../../c-api/import.rst:135
168
159
msgid ""
169
160
"If *name* points to a dotted name of the form ``package.module``, any "
170
161
"package structures not already created will still not be created."
171
162
msgstr ""
172
163
173
- #: ../../c-api/import.rst:150
164
+ #: ../../c-api/import.rst:138
174
165
msgid ""
175
166
"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:"
176
167
"`PyImport_ExecCodeModuleWithPathnames`."
177
168
msgstr ""
178
169
179
- #: ../../c-api/import.rst:153
170
+ #: ../../c-api/import.rst:141
180
171
msgid ""
181
172
"The setting of :attr:`__cached__` and :attr:`__loader__` is deprecated. See :"
182
173
"class:`~importlib.machinery.ModuleSpec` for alternatives."
183
174
msgstr ""
184
175
185
- #: ../../c-api/import.rst:161
176
+ #: ../../c-api/import.rst:149
186
177
msgid ""
187
178
"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute "
188
179
"of the module object is set to *pathname* if it is non-``NULL``."
189
180
msgstr ""
190
181
191
- #: ../../c-api/import.rst:164
182
+ #: ../../c-api/import.rst:152
192
183
msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`."
193
184
msgstr "也請見 :c:func:`PyImport_ExecCodeModuleWithPathnames`\\ 。"
194
185
195
- #: ../../c-api/import.rst:169
186
+ #: ../../c-api/import.rst:157
196
187
msgid ""
197
188
"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` "
198
189
"attribute of the module object is set to *cpathname* if it is non-``NULL``. "
199
190
"Of the three functions, this is the preferred one to use."
200
191
msgstr ""
201
192
202
- #: ../../c-api/import.rst:175
193
+ #: ../../c-api/import.rst:163
203
194
msgid ""
204
195
"Setting :attr:`__cached__` is deprecated. See :class:`~importlib.machinery."
205
196
"ModuleSpec` for alternatives."
206
197
msgstr ""
207
198
208
- #: ../../c-api/import.rst:182
199
+ #: ../../c-api/import.rst:170
209
200
msgid ""
210
201
"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and "
211
202
"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out "
212
203
"what the value for *pathname* should be from *cpathname* if the former is "
213
204
"set to ``NULL``."
214
205
msgstr ""
215
206
216
- #: ../../c-api/import.rst:188
207
+ #: ../../c-api/import.rst:176
217
208
msgid ""
218
209
"Uses :func:`!imp.source_from_cache()` in calculating the source path if only "
219
210
"the bytecode path is provided."
220
211
msgstr ""
221
212
222
- #: ../../c-api/import.rst:191
213
+ #: ../../c-api/import.rst:179
223
214
msgid "No longer uses the removed :mod:`!imp` module."
224
215
msgstr "不再使用已被移除的 :mod:`!imp` 模組。"
225
216
226
- #: ../../c-api/import.rst:197
217
+ #: ../../c-api/import.rst:185
227
218
msgid ""
228
219
"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` "
229
220
"file). The magic number should be present in the first four bytes of the "
230
221
"bytecode file, in little-endian byte order. Returns ``-1`` on error."
231
222
msgstr ""
232
223
233
- #: ../../c-api/import.rst:201
224
+ #: ../../c-api/import.rst:189
234
225
msgid "Return value of ``-1`` upon failure."
235
226
msgstr "當失敗時回傳 ``-1``。"
236
227
237
- #: ../../c-api/import.rst:207
228
+ #: ../../c-api/import.rst:195
238
229
msgid ""
239
230
"Return the magic tag string for :pep:`3147` format Python bytecode file "
240
231
"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is "
241
232
"authoritative and should be used instead of this function."
242
233
msgstr ""
243
234
244
- #: ../../c-api/import.rst:215
235
+ #: ../../c-api/import.rst:203
245
236
msgid ""
246
237
"Return the dictionary used for the module administration (a.k.a. ``sys."
247
238
"modules``). Note that this is a per-interpreter variable."
248
239
msgstr ""
249
240
250
- #: ../../c-api/import.rst:220
241
+ #: ../../c-api/import.rst:208
251
242
msgid ""
252
243
"Return the already imported module with the given name. If the module has "
253
244
"not been imported yet then returns ``NULL`` but does not set an error. "
254
245
"Returns ``NULL`` and sets an error if the lookup failed."
255
246
msgstr ""
256
247
257
- #: ../../c-api/import.rst:228
248
+ #: ../../c-api/import.rst:216
258
249
msgid ""
259
250
"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item "
260
251
"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` "
@@ -265,7 +256,7 @@ msgid ""
265
256
"path_importer_cache`. Return a new reference to the finder object."
266
257
msgstr ""
267
258
268
- #: ../../c-api/import.rst:239
259
+ #: ../../c-api/import.rst:227
269
260
msgid ""
270
261
"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the "
271
262
"module is not found, and ``-1`` with an exception set if the initialization "
@@ -274,31 +265,31 @@ msgid ""
274
265
"the module if it was already imported.)"
275
266
msgstr ""
276
267
277
- #: ../../c-api/import.rst:247
268
+ #: ../../c-api/import.rst:235
278
269
msgid "The ``__file__`` attribute is no longer set on the module."
279
270
msgstr ""
280
271
281
- #: ../../c-api/import.rst:253
272
+ #: ../../c-api/import.rst:241
282
273
msgid ""
283
274
"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a "
284
275
"UTF-8 encoded string instead of a Unicode object."
285
276
msgstr ""
286
277
287
- #: ../../c-api/import.rst:261
278
+ #: ../../c-api/import.rst:249
288
279
msgid ""
289
280
"This is the structure type definition for frozen module descriptors, as "
290
281
"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the "
291
282
"Python source distribution). Its definition, found in :file:`Include/import."
292
283
"h`, is::"
293
284
msgstr ""
294
285
295
- #: ../../c-api/import.rst:273
286
+ #: ../../c-api/import.rst:261
296
287
msgid ""
297
288
"The new ``is_package`` field indicates whether the module is a package or "
298
289
"not. This replaces setting the ``size`` field to a negative value."
299
290
msgstr ""
300
291
301
- #: ../../c-api/import.rst:279
292
+ #: ../../c-api/import.rst:267
302
293
msgid ""
303
294
"This pointer is initialized to point to an array of :c:struct:`_frozen` "
304
295
"records, terminated by one whose members are all ``NULL`` or zero. When a "
@@ -307,7 +298,7 @@ msgid ""
307
298
"frozen modules."
308
299
msgstr ""
309
300
310
- #: ../../c-api/import.rst:287
301
+ #: ../../c-api/import.rst:275
311
302
msgid ""
312
303
"Add a single module to the existing table of built-in modules. This is a "
313
304
"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning "
@@ -317,19 +308,19 @@ msgid ""
317
308
"before :c:func:`Py_Initialize`."
318
309
msgstr ""
319
310
320
- #: ../../c-api/import.rst:297
311
+ #: ../../c-api/import.rst:285
321
312
msgid ""
322
313
"Structure describing a single entry in the list of built-in modules. "
323
314
"Programs which embed Python may use an array of these structures in "
324
315
"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional "
325
316
"built-in modules. The structure consists of two members:"
326
317
msgstr ""
327
318
328
- #: ../../c-api/import.rst:305
319
+ #: ../../c-api/import.rst:293
329
320
msgid "The module name, as an ASCII encoded string."
330
321
msgstr ""
331
322
332
- #: ../../c-api/import.rst:314
323
+ #: ../../c-api/import.rst:302
333
324
msgid ""
334
325
"Add a collection of modules to the table of built-in modules. The *newtab* "
335
326
"array must end with a sentinel entry which contains ``NULL`` for the :c:"
@@ -340,7 +331,7 @@ msgid ""
340
331
"before :c:func:`Py_Initialize`."
341
332
msgstr ""
342
333
343
- #: ../../c-api/import.rst:321
334
+ #: ../../c-api/import.rst:309
344
335
msgid ""
345
336
"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` "
346
337
"or :c:func:`PyImport_ExtendInittab` must be called before each Python "
@@ -363,18 +354,18 @@ msgstr "__all__(套件變數)"
363
354
msgid "modules (in module sys)"
364
355
msgstr "modules(sys 模組中)"
365
356
366
- #: ../../c-api/import.rst:44 ../../c-api/import.rst:123
357
+ #: ../../c-api/import.rst:32 ../../c-api/import.rst:111
367
358
msgid "built-in function"
368
359
msgstr "built-in function(內建函式)"
369
360
370
- #: ../../c-api/import.rst:44
361
+ #: ../../c-api/import.rst:32
371
362
msgid "__import__"
372
363
msgstr "__import__"
373
364
374
- #: ../../c-api/import.rst:123
365
+ #: ../../c-api/import.rst:111
375
366
msgid "compile"
376
367
msgstr "compile(編譯)"
377
368
378
- #: ../../c-api/import.rst:259
369
+ #: ../../c-api/import.rst:247
379
370
msgid "freeze utility"
380
371
msgstr "freeze utility(凍結工具)"
0 commit comments