@@ -14,7 +14,7 @@ msgid ""
14
14
msgstr ""
15
15
"Project-Id-Version : Python 3.13\n "
16
16
"Report-Msgid-Bugs-To : \n "
17
- "POT-Creation-Date : 2024-06-07 14:15+0000\n "
17
+ "POT-Creation-Date : 2024-06-28 14:15+0000\n "
18
18
"PO-Revision-Date : 2021-06-28 00:48+0000\n "
19
19
"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
20
20
"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -95,6 +95,9 @@ msgid ""
95
95
"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
96
96
"`PyObject*`."
97
97
msgstr ""
98
+ "É o mesmo que :c:func:`PyDict_Contains`, mas *key* é especificada como uma "
99
+ "string de bytes :c:expr:`const char*` codificada em UTF-8, em vez de um :c:"
100
+ "expr:`PyObject*`."
98
101
99
102
#: ../../c-api/dict.rst:69
100
103
msgid "Return a new dictionary that contains the same key-value pairs as *p*."
@@ -149,31 +152,39 @@ msgid ""
149
152
"Return a new :term:`strong reference` to the object from dictionary *p* "
150
153
"which has a key *key*:"
151
154
msgstr ""
155
+ "Retorna uma nova :term:`referência forte` para o objeto dicionário *p* que "
156
+ "possui uma chave *key*:"
152
157
153
158
#: ../../c-api/dict.rst:107
154
159
msgid ""
155
160
"If the key is present, set *\\ *result* to a new :term:`strong reference` to "
156
161
"the value and return ``1``."
157
162
msgstr ""
163
+ "Se a chave estiver presente, define *\\ *result* como uma nova :term:"
164
+ "`referência forte` para o valor e retorna ``1``."
158
165
159
166
#: ../../c-api/dict.rst:109
160
167
msgid "If the key is missing, set *\\ *result* to ``NULL`` and return ``0``."
161
168
msgstr ""
169
+ "Se a chave estiver ausente, define *\\ *result* como ``NULL`` e retorna ``0``."
162
170
163
171
#: ../../c-api/dict.rst:110 ../../c-api/dict.rst:207
164
172
msgid "On error, raise an exception and return ``-1``."
165
- msgstr ""
173
+ msgstr "Em caso de erro, levanta uma exceção e retorna ``-1``. "
166
174
167
175
#: ../../c-api/dict.rst:114
168
176
msgid "See also the :c:func:`PyObject_GetItem` function."
169
- msgstr ""
177
+ msgstr "Veja também a função :c:func:`PyObject_GetItem`. "
170
178
171
179
#: ../../c-api/dict.rst:119
172
180
msgid ""
173
181
"Return a :term:`borrowed reference` to the object from dictionary *p* which "
174
182
"has a key *key*. Return ``NULL`` if the key *key* is missing *without* "
175
183
"setting an exception."
176
184
msgstr ""
185
+ "Retorna um :term:`referência emprestada` para o objeto do dicionário *p* que "
186
+ "possui uma chave *key*. Retorna ``NULL`` se a chave *key* não estiver "
187
+ "presente, mas *sem* definir uma exceção."
177
188
178
189
#: ../../c-api/dict.rst:125
179
190
msgid ""
@@ -232,6 +243,9 @@ msgid ""
232
243
"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
233
244
"`PyObject*`."
234
245
msgstr ""
246
+ "Similar a :c:func:`PyDict_GetItemRef`, mas *key* é especificada como uma "
247
+ "string de bytes :c:expr:`const char*` codificada em UTF-8, em vez de um :c:"
248
+ "expr:`PyObject*`."
235
249
236
250
#: ../../c-api/dict.rst:168
237
251
msgid ""
@@ -259,6 +273,14 @@ msgid ""
259
273
"and *default_value* was inserted. On failure, returns ``-1``, sets an "
260
274
"exception, and sets ``*result`` to ``NULL``."
261
275
msgstr ""
276
+ "Insere *default_value* no dicionário *p* com uma chave *key* se a chave "
277
+ "ainda não estiver presente no dicionário. Se *result* não for ``NULL``, "
278
+ "então *\\ *result* é definido como uma :term:`referência forte` para "
279
+ "*default_value*, se a chave não estiver presente, ou para o valor existente, "
280
+ "se *key* já estava presente no dicionário. Retorna ``1`` se a chave estava "
281
+ "presente e *default_value* não foi inserido, ou ``0`` se a chave não estava "
282
+ "presente e *default_value* foi inserido. Em caso de falha, retorna ``-1``, "
283
+ "define uma exceção e define ``*result`` como ``NULL``."
262
284
263
285
#: ../../c-api/dict.rst:189
264
286
msgid ""
@@ -267,36 +289,52 @@ msgid ""
267
289
"both *default_value* and *\\ *result* (if it's not ``NULL``). These may refer "
268
290
"to the same object: in that case you hold two separate references to it."
269
291
msgstr ""
292
+ "Para maior clareza: se você tiver uma referência forte para *default_value* "
293
+ "antes de chamar esta função, então depois que ela retornar, você terá uma "
294
+ "referência forte para *default_value* e *\\ *result* (se não for ``NULL``). "
295
+ "Estes podem referir-se ao mesmo objeto: nesse caso você mantém duas "
296
+ "referências separadas para ele."
270
297
271
298
#: ../../c-api/dict.rst:200
272
299
msgid ""
273
300
"Remove *key* from dictionary *p* and optionally return the removed value. Do "
274
301
"not raise :exc:`KeyError` if the key missing."
275
302
msgstr ""
303
+ "Remove *key* do dicionário *p* e, opcionalmente, retorna o valor removido. "
304
+ "Não levanta :exc:`KeyError` se a chave estiver ausente."
276
305
277
306
#: ../../c-api/dict.rst:203
278
307
msgid ""
279
308
"If the key is present, set *\\ *result* to a new reference to the removed "
280
309
"value if *result* is not ``NULL``, and return ``1``."
281
310
msgstr ""
311
+ "Se a chave estiver presente, define *\\ *result* como uma nova referência "
312
+ "para o valor se *result* não for ``NULL`` e retorna ``1``."
282
313
283
314
#: ../../c-api/dict.rst:205
284
315
msgid ""
285
316
"If the key is missing, set *\\ *result* to ``NULL`` if *result* is not "
286
317
"``NULL``, and return ``0``."
287
318
msgstr ""
319
+ "Se a chave estiver ausente, define *\\ *result* como ``NULL`` se *result* não "
320
+ "for ``NULL`` e retorna ``0``."
288
321
289
322
#: ../../c-api/dict.rst:209
290
323
msgid ""
291
324
"This is similar to :meth:`dict.pop`, but without the default value and not "
292
325
"raising :exc:`KeyError` if the key missing."
293
326
msgstr ""
327
+ "Isto é semelhante a :meth:`dict.pop`, mas sem o valor padrão e sem levantar :"
328
+ "exc:`KeyError` se a chave estiver ausente."
294
329
295
330
#: ../../c-api/dict.rst:217
296
331
msgid ""
297
332
"Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const "
298
333
"char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`."
299
334
msgstr ""
335
+ "Similar a :c:func:`PyDict_Pop`, mas *key* é especificada como uma string de "
336
+ "bytes :c:expr:`const char*` codificada em UTF-8, em vez de um :c:expr:"
337
+ "`PyObject*`."
300
338
301
339
#: ../../c-api/dict.rst:226
302
340
msgid ""
@@ -364,7 +402,18 @@ msgstr ""
364
402
"modificar os valores das chaves à medida que você itera no dicionário, mas "
365
403
"apenas enquanto o conjunto de chaves não mudar. Por exemplo::"
366
404
367
- #: ../../c-api/dict.rst:296
405
+ #: ../../c-api/dict.rst:293
406
+ msgid ""
407
+ "The function is not thread-safe in the :term:`free-threaded <free "
408
+ "threading>` build without external synchronization. You can use :c:macro:"
409
+ "`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::"
410
+ msgstr ""
411
+ "A função não é segura para thread na construção com :term:`threads livres "
412
+ "<free threading>` sem sincronização externa. Você pode usar :c:macro:"
413
+ "`Py_BEGIN_CRITICAL_SECTION` para travar o dicionário enquanto itera sobre "
414
+ "ele::"
415
+
416
+ #: ../../c-api/dict.rst:307
368
417
msgid ""
369
418
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
370
419
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -381,7 +430,7 @@ msgstr ""
381
430
"adicionados apenas se não houver uma chave correspondente em *a*. Retorna "
382
431
"``0`` em caso de sucesso ou ``-1`` se uma exceção foi levantada."
383
432
384
- #: ../../c-api/dict.rst:306
433
+ #: ../../c-api/dict.rst:317
385
434
msgid ""
386
435
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
387
436
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -395,7 +444,7 @@ msgstr ""
395
444
"argumento não tiver o atributo \" keys\" . Retorna ``0`` em caso de sucesso ou "
396
445
"``-1`` se uma exceção foi levantada."
397
446
398
- #: ../../c-api/dict.rst:315
447
+ #: ../../c-api/dict.rst:326
399
448
msgid ""
400
449
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
401
450
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -410,7 +459,7 @@ msgstr ""
410
459
"vence. Retorne ``0`` em caso de sucesso ou ``-1`` se uma exceção foi "
411
460
"levantada. Python equivalente (exceto para o valor de retorno)::"
412
461
413
- #: ../../c-api/dict.rst:329
462
+ #: ../../c-api/dict.rst:340
414
463
msgid ""
415
464
"Register *callback* as a dictionary watcher. Return a non-negative integer "
416
465
"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
@@ -422,7 +471,7 @@ msgstr ""
422
471
"`PyDict_Watch`. Em caso de erro (por exemplo, não há mais IDs de observador "
423
472
"disponíveis), retorna ``-1`` e define uma exceção."
424
473
425
- #: ../../c-api/dict.rst:338
474
+ #: ../../c-api/dict.rst:349
426
475
msgid ""
427
476
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
428
477
"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
@@ -432,7 +481,7 @@ msgstr ""
432
481
"c:func:`PyDict_AddWatcher`. Retorna ``0`` em caso de sucesso, ``-1`` em caso "
433
482
"de erro (por exemplo, se o *watcher_id* fornecido nunca foi registrado)."
434
483
435
- #: ../../c-api/dict.rst:346
484
+ #: ../../c-api/dict.rst:357
436
485
msgid ""
437
486
"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
438
487
"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
@@ -443,7 +492,7 @@ msgstr ""
443
492
"modificado ou desalocado. Retorna ``0`` em caso de sucesso ou ``-1`` em caso "
444
493
"de erro."
445
494
446
- #: ../../c-api/dict.rst:354
495
+ #: ../../c-api/dict.rst:365
447
496
msgid ""
448
497
"Mark dictionary *dict* as no longer watched. The callback granted "
449
498
"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
@@ -456,7 +505,7 @@ msgstr ""
456
505
"anteriormente por este observador. Retorna ``0`` em caso de sucesso ou "
457
506
"``-1`` em caso de erro."
458
507
459
- #: ../../c-api/dict.rst:363
508
+ #: ../../c-api/dict.rst:374
460
509
msgid ""
461
510
"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
462
511
"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
@@ -468,11 +517,11 @@ msgstr ""
468
517
"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED`` ou "
469
518
"``PyDict_EVENT_DEALLOCATED``."
470
519
471
- #: ../../c-api/dict.rst:371
520
+ #: ../../c-api/dict.rst:382
472
521
msgid "Type of a dict watcher callback function."
473
522
msgstr "Tipo de uma função de retorno de chamada de observador de dicionário."
474
523
475
- #: ../../c-api/dict.rst:373
524
+ #: ../../c-api/dict.rst:384
476
525
msgid ""
477
526
"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
478
527
"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -486,7 +535,7 @@ msgstr ""
486
535
"valor de *key*. Se *event* for ``PyDict_EVENT_DELETED``, *key* estará sendo "
487
536
"excluída do dicionário e *new_value* será ``NULL``."
488
537
489
- #: ../../c-api/dict.rst:379
538
+ #: ../../c-api/dict.rst:390
490
539
msgid ""
491
540
"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
492
541
"dict is merged into it. To maintain efficiency of this operation, per-key "
@@ -499,7 +548,7 @@ msgstr ""
499
548
"disso, um único ``PyDict_EVENT_CLONED`` é emitido e *key* será o dicionário "
500
549
"de origem."
501
550
502
- #: ../../c-api/dict.rst:385
551
+ #: ../../c-api/dict.rst:396
503
552
msgid ""
504
553
"The callback may inspect but must not modify *dict*; doing so could have "
505
554
"unpredictable effects, including infinite recursion. Do not trigger Python "
@@ -510,7 +559,7 @@ msgstr ""
510
559
"execução do código Python na função de retorno, pois isso poderia modificar "
511
560
"o dict como um efeito colateral."
512
561
513
- #: ../../c-api/dict.rst:389
562
+ #: ../../c-api/dict.rst:400
514
563
msgid ""
515
564
"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
516
565
"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -524,15 +573,15 @@ msgstr ""
524
573
"ressuscitado for destruído mais tarde, quaisquer funções de retorno do "
525
574
"observador ativos naquele momento serão chamados novamente."
526
575
527
- #: ../../c-api/dict.rst:395
576
+ #: ../../c-api/dict.rst:406
528
577
msgid ""
529
578
"Callbacks occur before the notified modification to *dict* takes place, so "
530
579
"the prior state of *dict* can be inspected."
531
580
msgstr ""
532
581
"As funções de retorno ocorrem antes que a modificação notificada no *dict* "
533
582
"ocorra, de modo que o estado anterior do *dict* possa ser inspecionado."
534
583
535
- #: ../../c-api/dict.rst:398
584
+ #: ../../c-api/dict.rst:409
536
585
msgid ""
537
586
"If the callback sets an exception, it must return ``-1``; this exception "
538
587
"will be printed as an unraisable exception using :c:func:"
@@ -542,7 +591,7 @@ msgstr ""
542
591
"exceção será impressa como uma exceção não reprovável usando :c:func:"
543
592
"`PyErr_WriteUnraisable`. Caso contrário, deverá retornar ``0``."
544
593
545
- #: ../../c-api/dict.rst:402
594
+ #: ../../c-api/dict.rst:413
546
595
msgid ""
547
596
"There may already be a pending exception set on entry to the callback. In "
548
597
"this case, the callback should return ``0`` with the same exception still "
0 commit comments