@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.13\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2026-01-13 15:09 +0000\n "
14+ "POT-Creation-Date : 2026-01-27 15:17 +0000\n "
1515"PO-Revision-Date : 2025-09-15 01:04+0000\n "
1616"Last-Translator : python-doc bot, 2025\n "
1717"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -182,25 +182,27 @@ msgstr ""
182182"# Após uma chamada de redefinição, var não tem mais valor,\n"
183183"# então var.get() levantaria uma exceção LookupError."
184184
185- #: ../../library/contextvars.rst:99
185+ #: ../../library/contextvars.rst:96
186+ msgid "The same *token* cannot be used twice."
187+ msgstr ""
188+
189+ #: ../../library/contextvars.rst:101
186190msgid ""
187191"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
188192"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
189- "variable to what it was before the corresponding *set*."
193+ "variable to what it was before the corresponding *set*. A single token "
194+ "cannot reset a context variable more than once."
190195msgstr ""
191- "Objetos *token* são retornados pelo método :meth:`ContextVar.set`. Eles "
192- "podem ser passados ao método :meth:`ContextVar.reset` para reverter o valor "
193- "da variável ao que era antes do *set* correspondente."
194196
195- #: ../../library/contextvars.rst:106
197+ #: ../../library/contextvars.rst:108
196198msgid ""
197199"A read-only property. Points to the :class:`ContextVar` object that created "
198200"the token."
199201msgstr ""
200202"Uma propriedade somente leitura. Aponta para o objeto :class:`ContextVar` "
201203"que criou o token."
202204
203- #: ../../library/contextvars.rst:111
205+ #: ../../library/contextvars.rst:113
204206msgid ""
205207"A read-only property. Set to the value the variable had before the :meth:"
206208"`ContextVar.set` method call that created the token. It points to :attr:"
@@ -210,35 +212,35 @@ msgstr ""
210212"antes da chamada do método :meth:`ContextVar.set` que criou o token. Aponta "
211213"para :attr:`Token.MISSING` se a variável não foi definida antes da chamada."
212214
213- #: ../../library/contextvars.rst:118
215+ #: ../../library/contextvars.rst:120
214216msgid "A marker object used by :attr:`Token.old_value`."
215217msgstr "Um objeto marcador usado por :attr:`Token.old_value`."
216218
217- #: ../../library/contextvars.rst:122
219+ #: ../../library/contextvars.rst:124
218220msgid "Manual Context Management"
219221msgstr "Gerenciamento de contexto manual"
220222
221- #: ../../library/contextvars.rst:126
223+ #: ../../library/contextvars.rst:128
222224msgid "Returns a copy of the current :class:`~contextvars.Context` object."
223225msgstr "Retorna uma cópia do objeto :class:`~contextvars.Context` atual."
224226
225- #: ../../library/contextvars.rst:128
227+ #: ../../library/contextvars.rst:130
226228msgid ""
227229"The following snippet gets a copy of the current context and prints all "
228230"variables and their values that are set in it::"
229231msgstr ""
230232"O trecho a seguir obtém uma cópia do contexto atual e imprime todas as "
231233"variáveis e seus valores que estão definidos nele::"
232234
233- #: ../../library/contextvars.rst:131
235+ #: ../../library/contextvars.rst:133
234236msgid ""
235237"ctx: Context = copy_context()\n"
236238"print(list(ctx.items()))"
237239msgstr ""
238240"ctx: Context = copy_context()\n"
239241"print(list(ctx.items()))"
240242
241- #: ../../library/contextvars.rst:134
243+ #: ../../library/contextvars.rst:136
242244msgid ""
243245"The function has an *O*\\ (1) complexity, i.e. works equally fast for "
244246"contexts with a few context variables and for contexts that have a lot of "
@@ -248,19 +250,19 @@ msgstr ""
248250"para contextos com algumas variáveis de contexto e para contextos que têm "
249251"muitas delas."
250252
251- #: ../../library/contextvars.rst:141
253+ #: ../../library/contextvars.rst:143
252254msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
253255msgstr "Um mapeamento de :class:`ContextVars <ContextVar>` para seus valores."
254256
255- #: ../../library/contextvars.rst:143
257+ #: ../../library/contextvars.rst:145
256258msgid ""
257259"``Context()`` creates an empty context with no values in it. To get a copy "
258260"of the current context use the :func:`~contextvars.copy_context` function."
259261msgstr ""
260262"``Context()`` cria um contexto vazio sem valores nele. Para obter uma cópia "
261263"do contexto atual, use a função :func:`~contextvars.copy_context`."
262264
263- #: ../../library/contextvars.rst:147
265+ #: ../../library/contextvars.rst:149
264266msgid ""
265267"Each thread has its own effective stack of :class:`!Context` objects. The :"
266268"term:`current context` is the :class:`!Context` object at the top of the "
@@ -272,7 +274,7 @@ msgstr ""
272274"thread atual. Todos os objetos :class:`!Context` nas pilhas são considerados "
273275"como *inseridos*."
274276
275- #: ../../library/contextvars.rst:152
277+ #: ../../library/contextvars.rst:154
276278msgid ""
277279"*Entering* a context, which can be done by calling its :meth:`~Context.run` "
278280"method, makes the context the current context by pushing it onto the top of "
@@ -282,7 +284,7 @@ msgstr ""
282284"`~Context.run`, torna o contexto o contexto atual, colocando-o no topo da "
283285"pilha de contexto da thread atual."
284286
285- #: ../../library/contextvars.rst:156
287+ #: ../../library/contextvars.rst:158
286288msgid ""
287289"*Exiting* from the current context, which can be done by returning from the "
288290"callback passed to the :meth:`~Context.run` method, restores the current "
@@ -294,7 +296,7 @@ msgstr ""
294296"atual para o que era antes de o contexto ser inserido, retirando o contexto "
295297"do topo da pilha de contextos."
296298
297- #: ../../library/contextvars.rst:161
299+ #: ../../library/contextvars.rst:163
298300msgid ""
299301"Since each thread has its own context stack, :class:`ContextVar` objects "
300302"behave in a similar fashion to :func:`threading.local` when values are "
@@ -304,21 +306,21 @@ msgstr ""
304306"`ContextVar` se comportam de maneira semelhante a :func:`threading.local` "
305307"quando valores são atribuídos em threads diferentes."
306308
307- #: ../../library/contextvars.rst:165
309+ #: ../../library/contextvars.rst:167
308310msgid ""
309311"Attempting to enter an already entered context, including contexts entered "
310312"in other threads, raises a :exc:`RuntimeError`."
311313msgstr ""
312314"Tentar entrar em um contexto já inserido, incluindo contextos inseridos em "
313315"outras threads, levanta uma exceção :exc:`RuntimeError`."
314316
315- #: ../../library/contextvars.rst:168
317+ #: ../../library/contextvars.rst:170
316318msgid "After exiting a context, it can later be re-entered (from any thread)."
317319msgstr ""
318320"Após sair de um contexto, ele pode ser acessado novamente (de qualquer "
319321"thread)."
320322
321- #: ../../library/contextvars.rst:170
323+ #: ../../library/contextvars.rst:172
322324msgid ""
323325"Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set` "
324326"method are recorded in the current context. The :meth:`ContextVar.get` "
@@ -334,11 +336,11 @@ msgstr ""
334336"contexto enquanto o contexto foi inserido (se necessário, os valores podem "
335337"ser restaurados ao inserir novamente o contexto)."
336338
337- #: ../../library/contextvars.rst:177
339+ #: ../../library/contextvars.rst:179
338340msgid "Context implements the :class:`collections.abc.Mapping` interface."
339341msgstr "Context implementa a interface :class:`collections.abc.Mapping`."
340342
341- #: ../../library/contextvars.rst:181
343+ #: ../../library/contextvars.rst:183
342344msgid ""
343345"Enters the Context, executes ``callable(*args, **kwargs)``, then exits the "
344346"Context. Returns *callable*'s return value, or propagates an exception if "
@@ -348,11 +350,11 @@ msgstr ""
348350"Retorna o valor de retorno de *callable* ou propaga uma exceção, se ocorrer "
349351"uma."
350352
351- #: ../../library/contextvars.rst:185
353+ #: ../../library/contextvars.rst:187
352354msgid "Example:"
353355msgstr "Exemplo:"
354356
355- #: ../../library/contextvars.rst:187
357+ #: ../../library/contextvars.rst:189
356358msgid ""
357359"import contextvars\n"
358360"\n"
@@ -416,27 +418,27 @@ msgstr ""
416418"# No entanto, fora de 'ctx', 'var' ainda está definida para 'spam':\n"
417419"print(var.get()) # 'spam'"
418420
419- #: ../../library/contextvars.rst:233
421+ #: ../../library/contextvars.rst:235
420422msgid "Return a shallow copy of the context object."
421423msgstr "Retorna uma cópia rasa do objeto contexto."
422424
423- #: ../../library/contextvars.rst:237
425+ #: ../../library/contextvars.rst:239
424426msgid ""
425427"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
426428"otherwise."
427429msgstr ""
428430"Retorna ``True`` se *context* tem uma variável para *var* definida; do "
429431"contrário, retorna ``False``."
430432
431- #: ../../library/contextvars.rst:242
433+ #: ../../library/contextvars.rst:244
432434msgid ""
433435"Return the value of the *var* :class:`ContextVar` variable. If the variable "
434436"is not set in the context object, a :exc:`KeyError` is raised."
435437msgstr ""
436438"Retorna o valor da variável :class:`ContextVar` *var*. Se a variável não for "
437439"definida no objeto contexto, uma :exc:`KeyError` é levantada."
438440
439- #: ../../library/contextvars.rst:248
441+ #: ../../library/contextvars.rst:250
440442msgid ""
441443"Return the value for *var* if *var* has the value in the context object. "
442444"Return *default* otherwise. If *default* is not given, return ``None``."
@@ -445,36 +447,36 @@ msgstr ""
445447"contrário, retorna *default*. Se *default* não for fornecido, retorna "
446448"``None``."
447449
448- #: ../../library/contextvars.rst:254
450+ #: ../../library/contextvars.rst:256
449451msgid "Return an iterator over the variables stored in the context object."
450452msgstr "Retorna um iterador sobre as variáveis armazenadas no objeto contexto."
451453
452- #: ../../library/contextvars.rst:259
454+ #: ../../library/contextvars.rst:261
453455msgid "Return the number of variables set in the context object."
454456msgstr "Retorna o número das variáveis definidas no objeto contexto."
455457
456- #: ../../library/contextvars.rst:263
458+ #: ../../library/contextvars.rst:265
457459msgid "Return a list of all variables in the context object."
458460msgstr "Retorna uma lista de todas as variáveis no objeto contexto."
459461
460- #: ../../library/contextvars.rst:267
462+ #: ../../library/contextvars.rst:269
461463msgid "Return a list of all variables' values in the context object."
462464msgstr ""
463465"Retorna uma lista dos valores de todas as variáveis no objeto contexto."
464466
465- #: ../../library/contextvars.rst:272
467+ #: ../../library/contextvars.rst:274
466468msgid ""
467469"Return a list of 2-tuples containing all variables and their values in the "
468470"context object."
469471msgstr ""
470472"Retorna uma lista de tuplas de 2 elementos contendo todas as variáveis e "
471473"seus valores no objeto contexto."
472474
473- #: ../../library/contextvars.rst:277
475+ #: ../../library/contextvars.rst:279
474476msgid "asyncio support"
475477msgstr "Suporte a asyncio"
476478
477- #: ../../library/contextvars.rst:279
479+ #: ../../library/contextvars.rst:281
478480msgid ""
479481"Context variables are natively supported in :mod:`asyncio` and are ready to "
480482"be used without any extra configuration. For example, here is a simple echo "
@@ -487,7 +489,7 @@ msgstr ""
487489"disponibilizar o endereço de um cliente remoto na Task que lida com esse "
488490"cliente::"
489491
490- #: ../../library/contextvars.rst:285
492+ #: ../../library/contextvars.rst:287
491493msgid ""
492494"import asyncio\n"
493495"import contextvars\n"
0 commit comments