@@ -14,7 +14,7 @@ msgid ""
1414msgstr ""
1515"Project-Id-Version : Python 3.13\n "
1616"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 "
1818"PO-Revision-Date : 2021-06-28 00:48+0000\n "
1919"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n "
2020"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -95,6 +95,9 @@ msgid ""
9595"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
9696"`PyObject*`."
9797msgstr ""
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*`."
98101
99102#: ../../c-api/dict.rst:69
100103msgid "Return a new dictionary that contains the same key-value pairs as *p*."
@@ -149,31 +152,39 @@ msgid ""
149152"Return a new :term:`strong reference` to the object from dictionary *p* "
150153"which has a key *key*:"
151154msgstr ""
155+ "Retorna uma nova :term:`referência forte` para o objeto dicionário *p* que "
156+ "possui uma chave *key*:"
152157
153158#: ../../c-api/dict.rst:107
154159msgid ""
155160"If the key is present, set *\\ *result* to a new :term:`strong reference` to "
156161"the value and return ``1``."
157162msgstr ""
163+ "Se a chave estiver presente, define *\\ *result* como uma nova :term:"
164+ "`referência forte` para o valor e retorna ``1``."
158165
159166#: ../../c-api/dict.rst:109
160167msgid "If the key is missing, set *\\ *result* to ``NULL`` and return ``0``."
161168msgstr ""
169+ "Se a chave estiver ausente, define *\\ *result* como ``NULL`` e retorna ``0``."
162170
163171#: ../../c-api/dict.rst:110 ../../c-api/dict.rst:207
164172msgid "On error, raise an exception and return ``-1``."
165- msgstr ""
173+ msgstr "Em caso de erro, levanta uma exceção e retorna ``-1``. "
166174
167175#: ../../c-api/dict.rst:114
168176msgid "See also the :c:func:`PyObject_GetItem` function."
169- msgstr ""
177+ msgstr "Veja também a função :c:func:`PyObject_GetItem`. "
170178
171179#: ../../c-api/dict.rst:119
172180msgid ""
173181"Return a :term:`borrowed reference` to the object from dictionary *p* which "
174182"has a key *key*. Return ``NULL`` if the key *key* is missing *without* "
175183"setting an exception."
176184msgstr ""
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."
177188
178189#: ../../c-api/dict.rst:125
179190msgid ""
@@ -232,6 +243,9 @@ msgid ""
232243"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
233244"`PyObject*`."
234245msgstr ""
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*`."
235249
236250#: ../../c-api/dict.rst:168
237251msgid ""
@@ -259,6 +273,14 @@ msgid ""
259273"and *default_value* was inserted. On failure, returns ``-1``, sets an "
260274"exception, and sets ``*result`` to ``NULL``."
261275msgstr ""
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``."
262284
263285#: ../../c-api/dict.rst:189
264286msgid ""
@@ -267,36 +289,52 @@ msgid ""
267289"both *default_value* and *\\ *result* (if it's not ``NULL``). These may refer "
268290"to the same object: in that case you hold two separate references to it."
269291msgstr ""
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."
270297
271298#: ../../c-api/dict.rst:200
272299msgid ""
273300"Remove *key* from dictionary *p* and optionally return the removed value. Do "
274301"not raise :exc:`KeyError` if the key missing."
275302msgstr ""
303+ "Remove *key* do dicionário *p* e, opcionalmente, retorna o valor removido. "
304+ "Não levanta :exc:`KeyError` se a chave estiver ausente."
276305
277306#: ../../c-api/dict.rst:203
278307msgid ""
279308"If the key is present, set *\\ *result* to a new reference to the removed "
280309"value if *result* is not ``NULL``, and return ``1``."
281310msgstr ""
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``."
282313
283314#: ../../c-api/dict.rst:205
284315msgid ""
285316"If the key is missing, set *\\ *result* to ``NULL`` if *result* is not "
286317"``NULL``, and return ``0``."
287318msgstr ""
319+ "Se a chave estiver ausente, define *\\ *result* como ``NULL`` se *result* não "
320+ "for ``NULL`` e retorna ``0``."
288321
289322#: ../../c-api/dict.rst:209
290323msgid ""
291324"This is similar to :meth:`dict.pop`, but without the default value and not "
292325"raising :exc:`KeyError` if the key missing."
293326msgstr ""
327+ "Isto é semelhante a :meth:`dict.pop`, mas sem o valor padrão e sem levantar :"
328+ "exc:`KeyError` se a chave estiver ausente."
294329
295330#: ../../c-api/dict.rst:217
296331msgid ""
297332"Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const "
298333"char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`."
299334msgstr ""
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*`."
300338
301339#: ../../c-api/dict.rst:226
302340msgid ""
@@ -364,7 +402,18 @@ msgstr ""
364402"modificar os valores das chaves à medida que você itera no dicionário, mas "
365403"apenas enquanto o conjunto de chaves não mudar. Por exemplo::"
366404
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
368417msgid ""
369418"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
370419"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -381,7 +430,7 @@ msgstr ""
381430"adicionados apenas se não houver uma chave correspondente em *a*. Retorna "
382431"``0`` em caso de sucesso ou ``-1`` se uma exceção foi levantada."
383432
384- #: ../../c-api/dict.rst:306
433+ #: ../../c-api/dict.rst:317
385434msgid ""
386435"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
387436"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -395,7 +444,7 @@ msgstr ""
395444"argumento não tiver o atributo \" keys\" . Retorna ``0`` em caso de sucesso ou "
396445"``-1`` se uma exceção foi levantada."
397446
398- #: ../../c-api/dict.rst:315
447+ #: ../../c-api/dict.rst:326
399448msgid ""
400449"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
401450"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -410,7 +459,7 @@ msgstr ""
410459"vence. Retorne ``0`` em caso de sucesso ou ``-1`` se uma exceção foi "
411460"levantada. Python equivalente (exceto para o valor de retorno)::"
412461
413- #: ../../c-api/dict.rst:329
462+ #: ../../c-api/dict.rst:340
414463msgid ""
415464"Register *callback* as a dictionary watcher. Return a non-negative integer "
416465"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
@@ -422,7 +471,7 @@ msgstr ""
422471"`PyDict_Watch`. Em caso de erro (por exemplo, não há mais IDs de observador "
423472"disponíveis), retorna ``-1`` e define uma exceção."
424473
425- #: ../../c-api/dict.rst:338
474+ #: ../../c-api/dict.rst:349
426475msgid ""
427476"Clear watcher identified by *watcher_id* previously returned from :c:func:"
428477"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
@@ -432,7 +481,7 @@ msgstr ""
432481"c:func:`PyDict_AddWatcher`. Retorna ``0`` em caso de sucesso, ``-1`` em caso "
433482"de erro (por exemplo, se o *watcher_id* fornecido nunca foi registrado)."
434483
435- #: ../../c-api/dict.rst:346
484+ #: ../../c-api/dict.rst:357
436485msgid ""
437486"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
438487"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
@@ -443,7 +492,7 @@ msgstr ""
443492"modificado ou desalocado. Retorna ``0`` em caso de sucesso ou ``-1`` em caso "
444493"de erro."
445494
446- #: ../../c-api/dict.rst:354
495+ #: ../../c-api/dict.rst:365
447496msgid ""
448497"Mark dictionary *dict* as no longer watched. The callback granted "
449498"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
@@ -456,7 +505,7 @@ msgstr ""
456505"anteriormente por este observador. Retorna ``0`` em caso de sucesso ou "
457506"``-1`` em caso de erro."
458507
459- #: ../../c-api/dict.rst:363
508+ #: ../../c-api/dict.rst:374
460509msgid ""
461510"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
462511"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
@@ -468,11 +517,11 @@ msgstr ""
468517"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED`` ou "
469518"``PyDict_EVENT_DEALLOCATED``."
470519
471- #: ../../c-api/dict.rst:371
520+ #: ../../c-api/dict.rst:382
472521msgid "Type of a dict watcher callback function."
473522msgstr "Tipo de uma função de retorno de chamada de observador de dicionário."
474523
475- #: ../../c-api/dict.rst:373
524+ #: ../../c-api/dict.rst:384
476525msgid ""
477526"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
478527"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -486,7 +535,7 @@ msgstr ""
486535"valor de *key*. Se *event* for ``PyDict_EVENT_DELETED``, *key* estará sendo "
487536"excluída do dicionário e *new_value* será ``NULL``."
488537
489- #: ../../c-api/dict.rst:379
538+ #: ../../c-api/dict.rst:390
490539msgid ""
491540"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
492541"dict is merged into it. To maintain efficiency of this operation, per-key "
@@ -499,7 +548,7 @@ msgstr ""
499548"disso, um único ``PyDict_EVENT_CLONED`` é emitido e *key* será o dicionário "
500549"de origem."
501550
502- #: ../../c-api/dict.rst:385
551+ #: ../../c-api/dict.rst:396
503552msgid ""
504553"The callback may inspect but must not modify *dict*; doing so could have "
505554"unpredictable effects, including infinite recursion. Do not trigger Python "
@@ -510,7 +559,7 @@ msgstr ""
510559"execução do código Python na função de retorno, pois isso poderia modificar "
511560"o dict como um efeito colateral."
512561
513- #: ../../c-api/dict.rst:389
562+ #: ../../c-api/dict.rst:400
514563msgid ""
515564"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
516565"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -524,15 +573,15 @@ msgstr ""
524573"ressuscitado for destruído mais tarde, quaisquer funções de retorno do "
525574"observador ativos naquele momento serão chamados novamente."
526575
527- #: ../../c-api/dict.rst:395
576+ #: ../../c-api/dict.rst:406
528577msgid ""
529578"Callbacks occur before the notified modification to *dict* takes place, so "
530579"the prior state of *dict* can be inspected."
531580msgstr ""
532581"As funções de retorno ocorrem antes que a modificação notificada no *dict* "
533582"ocorra, de modo que o estado anterior do *dict* possa ser inspecionado."
534583
535- #: ../../c-api/dict.rst:398
584+ #: ../../c-api/dict.rst:409
536585msgid ""
537586"If the callback sets an exception, it must return ``-1``; this exception "
538587"will be printed as an unraisable exception using :c:func:"
@@ -542,7 +591,7 @@ msgstr ""
542591"exceção será impressa como uma exceção não reprovável usando :c:func:"
543592"`PyErr_WriteUnraisable`. Caso contrário, deverá retornar ``0``."
544593
545- #: ../../c-api/dict.rst:402
594+ #: ../../c-api/dict.rst:413
546595msgid ""
547596"There may already be a pending exception set on entry to the callback. In "
548597"this case, the callback should return ``0`` with the same exception still "
0 commit comments