Repository navigation
Expand file tree
/
Copy pathextension-modules.po
More file actions
610 lines (536 loc) · 22.6 KB
/
Copy pathextension-modules.po
File metadata and controls
610 lines (536 loc) · 22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-25 16:18+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: python-doc bot, 2026\n"
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
"teams/5390/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
"1000000 == 0 ? 1 : 2;\n"
#: ../../c-api/extension-modules.rst:6
msgid "Defining extension modules"
msgstr "Definindo módulos de extensão"
#: ../../c-api/extension-modules.rst:8
msgid ""
"A C extension for CPython is a shared library (for example, a ``.so`` file "
"on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python "
"process (for example, it is compiled with compatible compiler settings), and "
"which exports an :dfn:`export hook` function (or an old-style :ref:"
"`initialization function <extension-pyinit>`)."
msgstr ""
#: ../../c-api/extension-modules.rst:14
msgid ""
"To be importable by default (that is, by :py:class:`importlib.machinery."
"ExtensionFileLoader`), the shared library must be available on :py:attr:`sys."
"path`, and must be named after the module name plus an extension listed in :"
"py:attr:`importlib.machinery.EXTENSION_SUFFIXES`."
msgstr ""
"Para ser importável por padrão (ou seja, por :py:class:`importlib.machinery."
"ExtensionFileLoader`), a biblioteca compartilhada deve estar disponível em :"
"py:attr:`sys.path` e deve ser nomeada após o nome do módulo mais uma "
"extensão listada em :py:attr:`importlib.machinery.EXTENSION_SUFFIXES`."
#: ../../c-api/extension-modules.rst:22
msgid ""
"Building, packaging and distributing extension modules is best done with "
"third-party tools, and is out of scope of this document. One suitable tool "
"is Setuptools, whose documentation can be found at https://setuptools.pypa."
"io/en/latest/setuptools.html."
msgstr ""
"A construção, o empacotamento e a distribuição de módulos de extensão são "
"melhor realizados com ferramentas de terceiros e estão fora do escopo deste "
"documento. Uma ferramenta adequada é o Setuptools, cuja documentação pode "
"ser encontrada em https://setuptools.pypa.io/en/latest/setuptools.html."
#: ../../c-api/extension-modules.rst:30
msgid "Extension export hook"
msgstr ""
#: ../../c-api/extension-modules.rst:34
msgid ""
"Support for the :samp:`PyModExport_{<name>}` export hook was added in Python "
"3.15. The older way of defining modules is still available: consult either "
"the :ref:`extension-pyinit` section or earlier versions of this "
"documentation if you plan to support earlier Python versions."
msgstr ""
#: ../../c-api/extension-modules.rst:39
msgid ""
"The export hook must be an exported function with the following signature:"
msgstr ""
#: ../../c-api/extension-modules.rst:43
msgid ""
"For modules with ASCII-only names, the :ref:`export hook <extension-export-"
"hook>` must be named :samp:`PyModExport_{<name>}`, with ``<name>`` replaced "
"by the module's name."
msgstr ""
#: ../../c-api/extension-modules.rst:47
msgid ""
"For non-ASCII module names, the export hook must instead be named :samp:"
"`PyModExportU_{<name>}` (note the ``U``), with ``<name>`` encoded using "
"Python's *punycode* encoding with hyphens replaced by underscores. In Python:"
msgstr ""
#: ../../c-api/extension-modules.rst:51
msgid ""
"def hook_name(name):\n"
" try:\n"
" suffix = b'_' + name.encode('ascii')\n"
" except UnicodeEncodeError:\n"
" suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')\n"
" return b'PyModExport' + suffix"
msgstr ""
#: ../../c-api/extension-modules.rst:60
msgid ""
"The export hook returns an array of :c:type:`PySlot` entries, terminated by "
"an entry with a slot ID of ``0``. These slots describe how the module should "
"be created and initialized."
msgstr ""
#: ../../c-api/extension-modules.rst:64
msgid ""
"This array must remain valid and constant until interpreter shutdown. "
"Typically, it should use ``static`` storage. Prefer using the :c:macro:"
"`Py_mod_create` and :c:macro:`Py_mod_exec` slots for any dynamic behavior."
msgstr ""
#: ../../c-api/extension-modules.rst:69
msgid ""
"The export hook may return ``NULL`` with an exception set to signal failure."
msgstr ""
#: ../../c-api/extension-modules.rst:71
msgid ""
"It is recommended to define the export hook function using a helper macro:"
msgstr ""
#: ../../c-api/extension-modules.rst:75
msgid "Declare an extension module export hook. This macro:"
msgstr ""
#: ../../c-api/extension-modules.rst:78
msgid "specifies the :c:expr:`PySlot*` return type,"
msgstr ""
#: ../../c-api/extension-modules.rst:79 ../../c-api/extension-modules.rst:248
msgid "adds any special linkage declarations required by the platform, and"
msgstr ""
"adiciona quaisquer declarações de vinculação especiais exigidas pela "
"plataforma e"
#: ../../c-api/extension-modules.rst:80 ../../c-api/extension-modules.rst:249
msgid "for C++, declares the function as ``extern \"C\"``."
msgstr "para C++, declara a função como ``extern \"C\"``."
#: ../../c-api/extension-modules.rst:82 ../../c-api/extension-modules.rst:279
msgid "For example, a module called ``spam`` would be defined like this::"
msgstr "Por exemplo, um módulo chamado ``spam`` seria definido assim::"
#: ../../c-api/extension-modules.rst:84
msgid ""
"PyABIInfo_VAR(abi_info);\n"
"\n"
"static PySlot spam_slots[] = {\n"
" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n"
" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n"
" PySlot_FUNC(Py_mod_init, spam_init_function),\n"
" ...\n"
" PySlot_END\n"
"};\n"
"\n"
"PyMODEXPORT_FUNC\n"
"PyModExport_spam(void)\n"
"{\n"
" return spam_slots;\n"
"}"
msgstr ""
#: ../../c-api/extension-modules.rst:100
msgid ""
"The export hook is typically the only non-\\ ``static`` item defined in the "
"module's C source."
msgstr ""
#: ../../c-api/extension-modules.rst:105
msgid ""
"The hook should be kept short. If it does more than ``return`` a static "
"array, several caveats apply:"
msgstr ""
#: ../../c-api/extension-modules.rst:108
msgid ""
"If you need to use any Python C API, it is recommended to call :c:func:"
"`PyABIInfo_Check` first to raise an exception, rather than crash, in common "
"cases of ABI mismatch."
msgstr ""
#: ../../c-api/extension-modules.rst:111
msgid ""
"Code in the export hook must never rely on the :term:`GIL`: :term:`free-"
"threaded builds <free-threaded build>` of Python can only check the :c:macro:"
"`Py_mod_gil` slot (or the lack of it) after the hook returns,"
msgstr ""
#: ../../c-api/extension-modules.rst:114
msgid ""
"Similarly, the hook may be called in any subinterpreter, since the :c:macro:"
"`Py_mod_multiple_interpreters` slot (or lack of it) is only checked after "
"the hook returns."
msgstr ""
#: ../../c-api/extension-modules.rst:118
msgid "For example::"
msgstr "Por exemplo::"
#: ../../c-api/extension-modules.rst:120
msgid ""
"PyMODEXPORT_FUNC\n"
"PyModExport_modulename(void)\n"
"{\n"
" if (PyABIInfo_Check(&abi_info, \"modulename\") < 0) {\n"
" /* ABI mismatch. It's not safe to examine the raised exception. */\n"
" return NULL;\n"
" }\n"
"\n"
" /* use Python API (as little as possible); don't rely on GIL */\n"
"\n"
" return modulename_slots;\n"
"}"
msgstr ""
#: ../../c-api/extension-modules.rst:135
msgid ""
"It is possible to export multiple modules from a single shared library by "
"defining multiple export hooks. However, importing them requires a custom "
"importer or suitably named copies/links of the extension file, because "
"Python's import machinery only finds the function corresponding to the "
"filename. See the `Multiple modules in one library <https://peps.python.org/"
"pep-0489/#multiple-modules-in-one-library>`__ section in :pep:`489` for "
"details."
msgstr ""
#: ../../c-api/extension-modules.rst:147
msgid "Multi-phase initialization"
msgstr "Inicialização multifásica"
#: ../../c-api/extension-modules.rst:149
msgid "The process of creating an extension module follows several phases:"
msgstr ""
#: ../../c-api/extension-modules.rst:151
msgid ""
"Python finds and calls the export hook to get information on how to create "
"the module."
msgstr ""
#: ../../c-api/extension-modules.rst:153
msgid ""
"Before any substantial code is executed, Python can determine which "
"capabilities the module supports, and it can adjust the environment or "
"refuse loading an incompatible extension. Slots like :c:data:`Py_mod_abi`, :"
"c:data:`Py_mod_gil` and :c:data:`Py_mod_multiple_interpreters` influence "
"this step."
msgstr ""
#: ../../c-api/extension-modules.rst:158
msgid ""
"By default, Python itself then creates the module object -- that is, it does "
"the equivalent of calling :py:meth:`~object.__new__` when creating an "
"object. This step can be overridden using the :c:data:`Py_mod_create` slot."
msgstr ""
#: ../../c-api/extension-modules.rst:161
msgid ""
"Python sets initial module attributes like :attr:`~module.__package__` and :"
"attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys."
"modules`."
msgstr ""
#: ../../c-api/extension-modules.rst:164
msgid ""
"Afterwards, the module object is initialized in an extension-specific way -- "
"the equivalent of :py:meth:`~object.__init__` when creating an object, or of "
"executing top-level code in a Python-language module. The behavior is "
"specified using the :c:data:`Py_mod_exec` slot."
msgstr ""
#: ../../c-api/extension-modules.rst:169
msgid ""
"This is called *multi-phase initialization* to distinguish it from the "
"legacy (but still supported) :ref:`single-phase initialization <single-phase-"
"initialization>`, where an initialization function returns a fully "
"constructed module."
msgstr ""
#: ../../c-api/extension-modules.rst:175
msgid "Added support for multi-phase initialization (:pep:`489`)."
msgstr "Adicionado suporte para inicialização multifásica (:pep:`489`)."
#: ../../c-api/extension-modules.rst:179
msgid "Multiple module instances"
msgstr "Várias instâncias de módulo"
#: ../../c-api/extension-modules.rst:181
msgid ""
"By default, extension modules are not singletons. For example, if the :py:"
"attr:`sys.modules` entry is removed and the module is re-imported, a new "
"module object is created and, typically, populated with fresh method and "
"type objects. The old module is subject to normal garbage collection. This "
"mirrors the behavior of pure-Python modules."
msgstr ""
#: ../../c-api/extension-modules.rst:188
msgid ""
"Additional module instances may be created in :ref:`sub-interpreters <sub-"
"interpreter-support>` or after Python runtime reinitialization (:c:func:"
"`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing Python "
"objects between module instances would likely cause crashes or undefined "
"behavior."
msgstr ""
"Instâncias adicionais do módulo podem ser criadas em :ref:"
"`subinterpretadores <sub-interpreter-support>` ou após a reinicialização do "
"tempo de execução do Python (:c:func:`Py_Finalize` e :c:func:"
"`Py_Initialize`). Nesses casos, compartilhar objetos Python entre instâncias "
"do módulo provavelmente causaria travamentos ou comportamento indefinido."
#: ../../c-api/extension-modules.rst:195
msgid ""
"To avoid such issues, each instance of an extension module should be "
"*isolated*: changes to one instance should not implicitly affect the others, "
"and all state owned by the module, including references to Python objects, "
"should be specific to a particular module instance. See :ref:`isolating-"
"extensions-howto` for more details and a practical guide."
msgstr ""
"Para evitar tais problemas, cada instância de um módulo de extensão deve ser "
"*isolada*: alterações em uma instância não devem afetar implicitamente as "
"outras, e todos os estados pertencentes ao módulo, incluindo referências a "
"objetos Python, devem ser específicos de uma instância específica do módulo. "
"Consulte :ref:`isolating-extensions-howto` para obter mais detalhes e um "
"guia prático."
#: ../../c-api/extension-modules.rst:201
msgid ""
"A simpler way to avoid these issues is :ref:`raising an error on repeated "
"initialization <isolating-extensions-optout>`."
msgstr ""
"Uma maneira mais simples de evitar esses problemas é :ref:`levantar um erro "
"na inicialização repetida <isolating-extensions-optout>`."
#: ../../c-api/extension-modules.rst:204
msgid ""
"All modules are expected to support :ref:`sub-interpreters <sub-interpreter-"
"support>`, or otherwise explicitly signal a lack of support. This is usually "
"achieved by isolation or blocking repeated initialization, as above. A "
"module may also be limited to the main interpreter using the :c:data:"
"`Py_mod_multiple_interpreters` slot."
msgstr ""
"Espera-se que todos os módulos ofereçam suporte a :ref:`subinterpretador "
"<sub-interpreter-support>`, ou então sinalizem explicitamente a falta de "
"suporte. Isso geralmente é obtido por isolamento ou bloqueio de "
"inicializações repetidas, como acima. Um módulo também pode ser limitado ao "
"interpretador principal usando o slot :c:data:`Py_mod_multiple_interpreters`."
#: ../../c-api/extension-modules.rst:216
msgid "``PyInit`` function"
msgstr ""
#: ../../c-api/extension-modules.rst:220
msgid ""
"This functionality will not get new features, but there are no plans to "
"remove it."
msgstr ""
#: ../../c-api/extension-modules.rst:223
msgid ""
"Instead of :c:func:`PyModExport_modulename`, an extension module can define "
"an older-style :dfn:`initialization function` with the signature:"
msgstr ""
#: ../../c-api/extension-modules.rst:228
msgid ""
"Its name should be :samp:`PyInit_{<name>}`, with ``<name>`` replaced by the "
"name of the module. For non-ASCII module names, use :samp:`PyInitU_{<name>}` "
"instead, with ``<name>`` encoded in the same way as for the :ref:`export "
"hook <extension-export-hook>` (that is, using Punycode with underscores)."
msgstr ""
#: ../../c-api/extension-modules.rst:235
msgid ""
"If a module exports both :samp:`PyInit_{<name>}` and :samp:"
"`PyModExport_{<name>}`, the :samp:`PyInit_{<name>}` function is ignored."
msgstr ""
#: ../../c-api/extension-modules.rst:239
msgid ""
"Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the "
"initialization function using a helper macro:"
msgstr ""
#: ../../c-api/extension-modules.rst:244
msgid "Declare an extension module initialization function. This macro:"
msgstr "Declara uma função de inicialização do módulo de extensão. Esta macro:"
#: ../../c-api/extension-modules.rst:247
msgid "specifies the :c:expr:`PyObject*` return type,"
msgstr "especifica o tipo de retorno :c:expr:`PyObject*`,"
#: ../../c-api/extension-modules.rst:252
msgid ""
"Normally, the initialization function (``PyInit_modulename``) returns a :c:"
"type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef."
"m_slots`. This allows Python to use :ref:`multi-phase initialization <multi-"
"phase-initialization>`."
msgstr ""
#: ../../c-api/extension-modules.rst:257
msgid ""
"Before it is returned, the ``PyModuleDef`` instance must be initialized "
"using the following function:"
msgstr ""
#: ../../c-api/extension-modules.rst:262
msgid ""
"Ensure a module definition is a properly initialized Python object that "
"correctly reports its type and a reference count."
msgstr ""
"Garante que uma definição de módulo é um objeto Python devidamente "
"inicializado que reporta corretamente seu tipo e uma contagem de referências."
#: ../../c-api/extension-modules.rst:265
msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred."
msgstr ""
"Retorna *def* convertido para ``PyObject*``, ou ``NULL`` se ocorrer um erro."
#: ../../c-api/extension-modules.rst:267
msgid ""
"Calling this function is required before returning a :c:type:`PyModuleDef` "
"from a module initialization function. It should not be used in other "
"contexts."
msgstr ""
#: ../../c-api/extension-modules.rst:271
msgid ""
"Note that Python assumes that ``PyModuleDef`` structures are statically "
"allocated. This function may return either a new reference or a borrowed "
"one; this reference must not be released."
msgstr ""
"Observe que o Python assume que as estruturas ``PyModuleDef`` são alocadas "
"estaticamente. Esta função pode retornar uma nova referência ou uma "
"referência emprestada; esta referência não deve ser liberada."
#: ../../c-api/extension-modules.rst:281
msgid ""
"static struct PyModuleDef spam_module = {\n"
" .m_base = PyModuleDef_HEAD_INIT,\n"
" .m_name = \"spam\",\n"
" ...\n"
"};\n"
"\n"
"PyMODINIT_FUNC\n"
"PyInit_spam(void)\n"
"{\n"
" return PyModuleDef_Init(&spam_module);\n"
"}"
msgstr ""
"static struct PyModuleDef spam_module = {\n"
" .m_base = PyModuleDef_HEAD_INIT,\n"
" .m_name = \"spam\",\n"
" ...\n"
"};\n"
"\n"
"PyMODINIT_FUNC\n"
"PyInit_spam(void)\n"
"{\n"
" return PyModuleDef_Init(&spam_module);\n"
"}"
#: ../../c-api/extension-modules.rst:297
msgid "Legacy single-phase initialization"
msgstr "Inicialização monofásica legada"
#: ../../c-api/extension-modules.rst:301
msgid ""
"Single-phase initialization is a legacy mechanism to initialize extension "
"modules, with known drawbacks and design flaws. Extension module authors are "
"encouraged to use multi-phase initialization instead."
msgstr ""
"A inicialização monofásica é um mecanismo legado para inicializar módulos de "
"extensão, com desvantagens e falhas de projeto conhecidas. Os autores de "
"módulos de extensão são incentivados a utilizar a inicialização multifásica."
#: ../../c-api/extension-modules.rst:305
msgid "However, there are no plans to remove support for it."
msgstr ""
#: ../../c-api/extension-modules.rst:307
msgid ""
"In single-phase initialization, the old-style :ref:`initialization function "
"<extension-pyinit>` (``PyInit_modulename``) should create, populate and "
"return a module object. This is typically done using :c:func:"
"`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`."
msgstr ""
#: ../../c-api/extension-modules.rst:313
msgid ""
"Single-phase initialization differs from the :ref:`default <multi-phase-"
"initialization>` in the following ways:"
msgstr ""
"A inicialização monofásica difere do :ref:`padrão <multi-phase-"
"initialization>` nas seguintes maneiras:"
#: ../../c-api/extension-modules.rst:316
msgid "Single-phase modules are, or rather *contain*, “singletons”."
msgstr "Módulos monofásicos são, ou melhor, *contêm*, “singletons”."
#: ../../c-api/extension-modules.rst:318
msgid ""
"When the module is first initialized, Python saves the contents of the "
"module's ``__dict__`` (that is, typically, the module's functions and types)."
msgstr ""
"Quando o módulo é inicializado pela primeira vez, o Python salva o conteúdo "
"do ``__dict__`` do módulo (ou seja, normalmente, as funções e os tipos do "
"módulo)."
#: ../../c-api/extension-modules.rst:322
msgid ""
"For subsequent imports, Python does not call the initialization function "
"again. Instead, it creates a new module object with a new ``__dict__``, and "
"copies the saved contents to it. For example, given a single-phase module "
"``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and "
"an exception class ``error``:"
msgstr ""
"Para importações subsequentes, o Python não chama a função de inicialização "
"novamente. Em vez disso, ele cria um novo objeto de módulo com um novo "
"``__dict__`` e copia o conteúdo salvo para ele. Por exemplo, dado um módulo "
"monofásico ``_testsinglephase`` [#testsinglephase]_ que define uma função "
"``sum`` e uma classe de exceção ``error``:"
#: ../../c-api/extension-modules.rst:330
msgid ""
">>> import sys\n"
">>> import _testsinglephase as one\n"
">>> del sys.modules['_testsinglephase']\n"
">>> import _testsinglephase as two\n"
">>> one is two\n"
"False\n"
">>> one.__dict__ is two.__dict__\n"
"False\n"
">>> one.sum is two.sum\n"
"True\n"
">>> one.error is two.error\n"
"True"
msgstr ""
">>> import sys\n"
">>> import _testsinglephase as one\n"
">>> del sys.modules['_testsinglephase']\n"
">>> import _testsinglephase as two\n"
">>> one is two\n"
"False\n"
">>> one.__dict__ is two.__dict__\n"
"False\n"
">>> one.sum is two.sum\n"
"True\n"
">>> one.error is two.error\n"
"True"
#: ../../c-api/extension-modules.rst:345
msgid ""
"The exact behavior should be considered a CPython implementation detail."
msgstr ""
"O comportamento exato deve ser considerado um detalhe da implementação do "
"CPython."
#: ../../c-api/extension-modules.rst:347
msgid ""
"To work around the fact that ``PyInit_modulename`` does not take a *spec* "
"argument, some state of the import machinery is saved and applied to the "
"first suitable module created during the ``PyInit_modulename`` call. "
"Specifically, when a sub-module is imported, this mechanism prepends the "
"parent package name to the name of the module."
msgstr ""
"Para contornar o fato de que ``PyInit_modulename`` não aceita um argumento "
"*spec*, parte do estado do mecanismo de importação é salvo e aplicado ao "
"primeiro módulo adequado criado durante a chamada ``PyInit_modulename``. "
"Especificamente, quando um submódulo é importado, esse mecanismo adiciona o "
"nome do pacote pai ao nome do módulo."
#: ../../c-api/extension-modules.rst:353
msgid ""
"A single-phase ``PyInit_modulename`` function should create “its” module "
"object as soon as possible, before any other module objects can be created."
msgstr ""
"Uma função monofásica ``PyInit_modulename`` deve criar “seu” objeto de "
"módulo o mais rápido possível, antes que qualquer outro objeto de módulo "
"possa ser criado."
#: ../../c-api/extension-modules.rst:356
msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported."
msgstr ""
"Nomes de módulos não ASCII (``PyInitU_modulename``) não são suportados."
#: ../../c-api/extension-modules.rst:358
msgid ""
"Single-phase modules support module lookup functions like :c:func:"
"`PyState_FindModule`."
msgstr ""
"Módulos monofásicos oferecem suporte a funções de pesquisa de módulos como :"
"c:func:`PyState_FindModule`."
#: ../../c-api/extension-modules.rst:361
msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL."
msgstr ""
#: ../../c-api/extension-modules.rst:363
msgid ""
"``_testsinglephase`` is an internal module used in CPython's self-test "
"suite; your installation may or may not include it."
msgstr ""
"``_testsinglephase`` é um módulo interno usado no conjunto de autotestes do "
"CPython; sua instalação pode ou não incluí-lo."